T h e   i d e a : 
 
     R e o r g a n i z e   t h e   l i s t !     t a k e   a l l   t x t   b i n a r y   c a l l s   a n d   p l a c e   t h e m   a t   t h e   e n d .     S e t   n u m b e r s   a s   n e e d e d 
 
     C h a n g e   a d d i u s   f o r   t b l - > t x t   o f f s e t t i n g   t o   r e f e r   t o   n e w   e n t r y   t h i n g i e s . 
 
     W o w .     T h a t ' s   r a t h e r   e a s y ! 
 
 
 
 
 
 C h a n g e   t h e   f o l l o w i n g   t o   a l l o w   d i f f e r e n t   b a s e   t x t   e n t r y   a d d r e s s e s 
 
 A L L   P R E S E N T   I N   T H E   6 7 5 7 2 0   C O M P R E S S E D   B I N A R Y 
 
 U S E   T H E   O N E   F R O M   T E H   H & X 3 D   F O N T ! 	 c o n v e r s i o n = 8 0 0 5 1 A 8 0 + o f f s e t   i n   f i l e ,   o r   b e t t e r   y e t   j u s t   s e a r c h 
 
 m i g h t   h a v e   m i s s e d   a   f e w   t b l s   i n   h e r e ,   b u t   t h e   t x t   a r e   t h e   e s s e n t i a l   o n e s 
 
 - D o n ' t   m o v e   t h e   t b l s ! - 
 
 
 
 t a r g e t   l o c a t i o n s   ( o v e r k i l l   o n   s i z e   t o   s u p p o r t   h u g e   c o n t e n t ) 
 
 n a m e   o f   b a n k 	 m a x   s i z e 	 c o d e w o r d 	 n e w   l o c a t i o n 
 
 m e s s a g e _ t x t 	 2 9 0 0 0 0 	 0 1 9 1 4 0 0 0 	 0 1 0 0 0 0 0 0 
 
 s e l e c t _ t x t 	 1 9 0 0 	 0 1 B A 5 0 0 0 	 0 1 2 9 0 0 0 0 
 
 m a i l _ t x t 	 1 F 0 0 0 	 0 1 B A 7 0 0 0 	 0 1 2 9 1 9 0 0 
 
 s u p e r _ t x t 	 2 9 0 0 	 0 1 B C 7 0 0 0 	 0 1 2 B 0 9 0 0 
 
 p s _ t x t 	 	 3 8 0 0 	 0 1 B C A 0 0 0 	 0 1 2 B 3 2 0 0 
 
 s t r i n g _ t x t 	 4 3 0 0 	 0 1 B C E 0 0 0 	 0 1 2 B 6 A 0 0 
 
 m a i l a _ t x t 	 5 0 0 0 	 0 1 B D 3 0 0 0 	 0 1 2 B A D 0 0 
 
 m a i l b _ t x t 	 7 0 0 0 	 " " 	 0 1 2 B F D 0 0 
 
 m a i l c _ t x t 	 3 0 0 0 	 " " 	 0 1 2 C 6 D 0 0 
 
 p s z _ t x t 	 1 0 0 0 	 " " 	 0 1 2 C 9 D 0 0 
 
 s u p e r z _ t x t 	 1 0 0 0 	 " " 	 0 1 2 C A D 0 0 
 
 m a i l a _ t b l 	 6 1 0 	 " " 	 0 1 2 C B D 0 0 
 
 m a i l b _ t b l 	 6 1 0 	 " " 	 0 1 2 C C 3 1 0 
 
 m a i l c _ t b l 	 6 1 0 	 " " 	 0 1 2 C C 9 2 0 
 
 p s z _ t b l 	 6 1 0 	 " " 	 0 1 2 C C F 3 0 
 
 s u p e r z _ t b l 	 6 1 0 	 " " 	 0 1 2 C D 5 4 0 
 
 n p c _ n a m e _ s t r 	 7 7 0 	 0 1 B E 6 0 0 0 	 0 1 2 C D B 5 0 
 
 	 	 	 	 0 1 2 C E 2 C 0 
 
 
 
 
 
 B D 4 0 0 0 	 m s g . t x t 
 
 	 8 0 0 9 E 4 7 4 	 4 C 9 F 4 	 3 C 1 8 0 0 B D   2 7 1 8 4 0 0 0 	 L U I   T 8 , 0 0 B D ;   A D D I U   T 8 , T 8 , 4 0 0 0 
 
 C F 9 0 0 0 	 m s g . t b l 
 
 	 4 C 9 2 4 	 2 A 0 1 3 F 9 4 	 S L T I   X , X , 3 F 9 4 	 m a x   e n t r i e s   h a c k 
 
 	 4 C B E 8 
 
 	 8 0 0 9 E 3 F C 	 	 3 C 0 5 0 0 D 1 	 	 L U I   A 1 , 0 0 D 1 
 
 	 8 0 0 9 E 4 1 0 	 	 2 4 A 5 0 0 0 0 	 	 A D D I U   A 1 , A 1 , 0 0 0 0 
 
 	 8 0 0 9 E 4 3 0 	 	 3 C 0 D 0 0 D 1   2 5 A D 0 0 0 0 	 L U I   T 5 , 0 0 D 1 ;   A D D I U   T 5 , T 5 , 0 0 0 0 
 
 D 0 5 0 0 0 	 s e l e c t . t x t 
 
 	 8 0 0 6 5 6 1 4 	 1 3 B 9 4 	 3 C 1 8 0 0 D 0   2 7 1 8 5 0 0 0 	 L U I   T 8 , 0 0 D 0 ;   A D D I U   T 8 , T 8 , 5 0 0 0 
 
 D 0 6 0 0 0 	 s e l e c t . t b l 
 
 	 1 4 3 2 C 	 S L T I 	 A T , A 0 , 0 2 5 F 	 m a x   e n t r i e s   h a c k 
 
 	 1 3 A C 4 	 - - , 0 2 5 F 
 
 	 8 0 0 6 5 5 9 C 	 	 3 C 0 5 0 0 D 0 	 	 L U I   A 1 , 0 0 D 0 
 
 	 8 0 0 6 5 5 B 0 	 	 2 4 A 5 6 0 0 0 	 	 A D D I U   A 1 , A 1 , 6 0 0 0 
 
 	 8 0 0 6 5 5 D 0 	 	 3 C 0 D 0 0 D 0   2 5 A D 6 0 0 0 	 L U I   T 5 , 0 0 D 0 ;   A D D I U   T 5 , T 5 , 6 0 0 0 
 
 D 0 7 0 0 0 	 m a i l . t x t 
 
 	 8 0 0 9 3 9 6 4 	 4 1 E E 4 	 3 C 1 8 0 0 D 0   2 7 1 8 7 0 0 0 	 L U I   T 8 , 0 0 D 0 ;   A D D I U   T 8 , T 8 , 7 0 0 0 
 
 D 1 0 0 0 0 	 m a i l . t b l 
 
 	 4 1 E 1 4 	 S L T I 	 x , x , 0 3 D 6 	 	 m a x   e n t r i e s   h a c k 
 
 	 4 2 3 3 C 	 , 0 3 D 6 
 
 	 8 0 0 9 3 8 E C 	 	 3 C 0 5 0 0 D 1 	 	 L U I   A 1 , 0 0 D 1 
 
 	 8 0 0 9 3 9 0 0 	 	 2 4 A 5 0 0 0 0 	 	 A D D I U   A 1 , A 1 , 0 0 0 0 
 
 	 8 0 0 9 3 9 2 0 	 	 3 C 0 D 0 0 D 1   2 5 A D 0 0 0 0 	 L U I   T 5 , 0 0 D 1 ;   A D D I U   T 5 , T 5 , 0 0 0 0 
 
 D 1 1 0 0 0 	 s u p e r . t x t 
 
 	 4 1 B 9 4 	 , 0 3 D 6 	 m a x   e n t r i e s   h a c k 
 
 	 4 2 0 C 0 	 , , 0 3 D 6 
 
 	 4 1 C 5 4 	 S L T I 	 A T , V 1 , 0 0 0 E 	 p o t e n t i a l l y   a l l o w   f u l l   s t r i n g   s i z e 
 
 	 8 0 0 9 3 6 E 4 	 4 1 C 6 4 	 3 C 1 8 0 0 D 1   2 7 1 8 1 0 0 0 	 L U I   T 8 , 0 0 D 1 ;   A D D I U   T 8 , T 8 , 1 0 0 0 
 
 D 1 2 0 0 0 	 s u p e r . t b l 
 
 	 8 0 0 9 3 6 2 C 	 	 	 L U I   T 9 , 0 0 D 1 ;   A D D I U   T 9 , T 9 , 2 0 0 0 
 
 	 8 0 0 9 3 6 6 C 	 	 3 C 0 5 0 0 D 1 	 	 L U I   A 1 , 0 0 D 1 
 
 	 8 0 0 9 3 6 8 0 	 	 2 4 A 5 2 0 0 0 	 	 A D D I U   A 1 , A 1 , 2 0 0 0 
 
 	 8 0 0 9 3 6 A 0 	 	 3 C 0 D 0 0 D 1   2 5 A D 2 0 0 0 	 L U I   T 5 , 0 0 D 1 ;   A D D I U   T 5 , T 5 , 2 0 0 0 
 
 D 1 3 0 0 0 	 p s . t x t 
 
 	 4 1 C D 4 	 , , 0 3 D 6 	 m a x   e n t r i e s   h a c k 
 
 	 4 2 2 3 4 	 , , 0 3 D 6 
 
 	 4 1 D 9 4 	 S L T I 	 A T , V 1 , 0 0 2 0 	 p o t e n t i a l l y   a l l o w   f u l l   s t r i n g   s i z e 
 
 	 8 0 0 9 3 8 2 4 	 4 1 D A 4 	 3 C 1 8 0 0 D 1   2 7 1 8 3 0 0 0 	 L U I   T 8 , 0 0 D 1 ;   A D D I U   T 8 , T 8 , 3 0 0 0 
 
 D 1 5 0 0 0 	 p s . t b l 
 
 	 8 0 0 9 3 7 6 C 	 	 	 L U I   T 9 , 0 0 D 1 ;   A D D I U   T 9 , T 9 , 5 0 0 0 
 
 	 8 0 0 9 3 7 A C 	 	 3 C 0 5 0 0 D 1 	 	 L U I   A 1 , 0 0 D 1 
 
 	 8 0 0 9 3 7 C 0 	 	 2 4 A 5 5 0 0 0 	 	 A D D I U   A 1 , A 1 , 5 0 0 0 
 
 	 8 0 0 9 3 7 E 0 	 	 3 C 0 D 0 0 D 1   2 5 A D 5 0 0 0 	 L U I   T 5 , 0 0 D 1 ;   A D D I U   T 5 , T 5 , 5 0 0 0 
 
 D 1 6 0 0 0 	 s t r i n g . t x t 
 
 	 8 0 0 C 3 F 1 C 	 7 2 4 9 C 	 3 C 1 8 0 0 D 1   2 7 1 8 6 0 0 0 	 L U I   T 8 , 0 0 D 1 ;   A D D I U   T 8 , T 8 , 6 0 0 0 
 
 	 8 0 0 C 4 0 1 C 	 N O P   t o   c o r r e c t   4   c h a r   s i z e   l i m i t ? 
 
 D 1 8 0 0 0 	 s t r i n g . t b l 
 
 	 7 2 5 0 C 	 S L T I 	 A T , A 3 , 0 7 F F 	 m a x   e n t r i e s   h a c k 
 
 	 7 2 3 C C 	 S L T I 	 A T , S 0 , 0 7 F F 	 
 
 	 8 0 0 C 3 E 6 4 	 	 	 L U I   T 9 , 0 0 D 2 ;   A D D I U   T 9 , T 9 , 8 0 0 0 
 
 	 8 0 0 C 3 E A 4 	 	 3 C 0 5 0 0 D 2 	 	 L U I   A 1 , 0 0 D 2 
 
 	 8 0 0 C 3 E B 8 	 	 2 4 A 5 8 0 0 0 	 	 A D D I U   A 1 , A 1 , 8 0 0 0 
 
 	 8 0 0 C 3 E D 8 	 	 3 C 0 D 0 0 D 2   2 5 A D 8 0 0 0 	 L U I   T 5 , 0 0 D 2 ;   A D D I U   T 5 , T 5 , 8 0 0 0 
 
 D 1 A 0 0 0 	 m u l t i b a n k 
 
 
 
 B B F 3 6 0 	 c h a r a c t e r   n a m e s   -   m u s t   h a c k   l a r g e r ! 
 
 
 
 + - + 
 
 8 0 1 0 6 A F 4 	 c h a r a c t e r   w i d t h s 
 
 + - + 
 
 8 0 1 4 1 F F 0 	 m s g _ t x t   b a n k   h a n d l e r s 
 
 0 x 0 	 4 	 ?   [ 1 ,   s o   m a y b e   a   " I ' m   l o a d e d "   f l a g ] 
 
 0 x 4 	 4 	 i n d e x   o f   t e x t   l o a d e d   ( i e .   c l o c k   w a r n i n g   =   0 x 9 C C ) 
 
 0 x 8 	 4 	 s i z e 
 
 0 x C 	 4 	 ? 
 
 8 0 1 4 2 0 0 0 	 l o a d e d   m s g _ t x t   b a n k 
 
 + - + 
 
 
 
 N o t e   s o m e   o f   t h e s e   a s s u m e   a   s h o r t   s t r i n g   v a l u e . 
 
 i e .   s e l e c t _ t x t   a s s u m e s   t h e   s t r i n g   i s   1 0   c h a r a c t e r s   o r   l e s s 
 
 W e   c a n   f o r c e   p o s i t i v e   f o r   a l l   t h e s e   t e s t s ,   a n d   h o p e   f o r   t h e   b e s t ! 
 
 
 
 c o r r e c t i o n s   f o r   s h o r t - s t r i n g   t e x t   t y p e s : 
 
 + s e l e c t _ t x t 
 
 	 8 0 0 6 5 6 0 4 	 1 3 B 8 4 	 2 C 6 1 F F F F 	 S L T I U 	 A T , V 1 , F F F F 
 
 	 ? 8 0 0 6 5 D D 0 	 A D D I U 	 A 1 , R 0 , 0 0 0 A 
 
 	 8 0 0 6 5 E 2 0 	 1 4 3 A 0 	 2 C 6 1 F F F F 	 S L T I U 	 A T , V 1 , F F F F 
 
 	 8 0 0 6 5 E 3 4 	 1 4 3 B 4 	 A D D I U 	 A 2 , R 0 , 0 0 0 A 	 [ u n n e c e s s a r y   w / 8 0 0 6 5 E 2 0 ] 
 
 	 8 0 0 6 5 E 7 4 	 1 4 3 F 4 	 2 C 8 1 0 0 0 B 	 S L T I U 	 A T , A 0 , 0 0 0 B   [ o p t i o n a l   -   a l i g n m e n t ] 
 
 	 8 0 0 6 5 E A 8 	 1 4 4 2 8 	 2 C 8 1 0 0 0 B 	 S L T I U 	 A T , A 0 , 0 0 0 B   [ o p t i o n a l   -   a l i g n m e n t ] 
 
 	 8 0 0 6 5 E B 0 	 1 4 4 3 0 	 0 0 0 6 2 8 2 5 	 O R 	 A 1 , R 0 , A 2 
 
 	 ? 8 0 0 6 5 E B C 	 2 8 8 1 0 0 0 A 	 S L T I 	 A T , A 0 , 0 0 1 0   [ o p t i o n a l   -   a l i g n m e n t ] 
 
 	 * 8 0 0 A 0 F 1 4 	 4 F 4 9 4 	 0 0 D 1 8 8 2 1 	 A D D U 	 S 1 , A 2 , S 1 
 
 	 8 0 0 6 5 2 A C 	 1 3 8 2 C 	 2 C C 1 F F F F 	 S L T I U 	 A T , A 2 , F F F F 
 
 	 8 0 0 6 5 2 D 4 	 1 3 8 5 4 	 2 C C 1 F F F F 	 S L T I U 	 A T , A 2 , F F F F 
 
 	 8 0 0 6 5 2 F C 	 1 3 8 7 C 	 2 C C 1 F F F F 	 S L T I U 	 A T , A 2 , F F F F 
 
 	 8 0 0 6 5 3 2 4 	 1 3 8 A 4 	 2 C C 1 F F F F 	 S L T I U 	 A T , A 2 , F F F F 
 
 	 8 0 0 6 5 1 C 0 	 1 3 7 4 0 	 2 C C 1 F F F F 	 S L T I U 	 A T , A 2 , F F F F 
 
 
 
 S t r i n g _ t x t   b a n k 
 
 t r y   t h i s : 
 
 8 0 0 C 4 0 1 C 	 7 2 5 9 C 	 0 2 0 0 4 0 2 5 	 - > 	 N O P   t o   c o r r e c t   4   c h a r   s i z e   l i m i t ? 
 
 8 0 0 9 E E 0 C 	 4 D 3 8 C 	 2 4 0 5 0 0 0 4 	 - > 	 0 0 0 A 
 
 
 
 C - 6 7 5 7 2 0 + 5 8 7 9 8 	 8 0 0 A A 2 1 8 : 	 r e t r i e v e   s t r i n g   f o r   7 F 1 C   -   c a t c h p h r a s e   c o m m a n d 
 
 2 7 B D F F E 0 	 A D D I U 	 S P , S P , F F E 0 
 
 A F B 0 0 0 1 8 	 S W 	 S 0 , 0 0 1 8   ( S P ) 
 
 0 0 8 0 8 0 2 5 	 O R 	 S 0 , A 0 , R 0 	 ; S 0 = A 0 :   
 
 A F B F 0 0 1 C 	 S W 	 R A , 0 0 1 C   ( S P ) 
 
 A F A 5 0 0 2 4 	 S W 	 A 1 , 0 0 2 4   ( S P ) 
 
 A F A 6 0 0 2 8 	 S W 	 A 2 , 0 0 2 8   ( S P ) 
 
 / / 8 0 0 A A 2 3 0 : 
 
 9 7 A E 0 0 2 6 	 L H U 	 T 6 , 0 0 2 6   ( S P ) 	 ; T 6 = A 1 - > h a l f w o r d 
 
 2 4 0 1 0 0 0 E 	 A D D I U 	 A T , R 0 , 0 0 0 E 	 ; A T = E 
 
 3 1 C F F 0 0 0 	 A N D I 	 T 7 , T 6 , F 0 0 0 	 ; T 7 = A 1   &   0 x 0 0 0 0 F 0 0 0 
 
 0 0 0 F C 3 0 3 	 S R A 	 T 8 , T 7 , 0 x C 	 ; T 8 = u p p e r   n i b b l e   o f   T 6 
 
 5 7 0 1 0 0 1 2 	 B N E L 	 T 8 , A T , 8 0 0 A A 2 8 C 	 ; q u i t   i f   = E 
 
 8 F B F 0 0 1 C 	 L W 	 R A , 0 0 1 C   ( S P ) 
 
 / / 8 0 0 A A 2 4 8 : 
 
 A 6 0 E 0 0 0 0 	 S H 	 T 6 , 0 0 0 0   ( S 0 ) 
 
 9 3 B 9 0 0 2 B 	 L B U 	 T 9 , 0 0 2 B   ( S P ) 	 ; T 9 = A 2 - > b y t e 
 
 2 6 0 4 0 4 E 5 	 A D D I U 	 A 0 , S 0 , 0 4 E 5 	 ; A 0 + = 4 E 5 :   p - > t a r g e t 
 
 2 4 0 5 0 0 0 4 	 A D D I U 	 A 1 , R 0 , 0 0 0 4 	 ; A 1 = m a x   s t r l e n : 	 4 	 a c t u a l   m a x i m u m   = 7 
 
 A 2 1 9 0 0 0 B 	 S B 	 T 9 , 0 0 0 B   ( S 0 ) 	 ; S a v e   b y t e   - >   A 0 + B 
 
 9 4 E 8 0 0 0 0 	 L H U 	 T 0 , 0 0 0 0   ( A 3 ) 
 
 A 6 0 8 0 5 2 0 	 S H 	 T 0 , 0 5 2 0   ( S 0 ) 	 ; S a v e   h a l f w o r d   - >   A 0 + 5 2 0 
 
 0 C 0 3 0 F D C 	 J A L 	 8 0 0 C 3 F 7 0 	 ; r e t r i e v e   s t r i n g   f r o m   s t r i n g _ t x t 
 
 9 4 E 6 0 0 0 2 	 L H U 	 A 2 , 0 0 0 2   ( A 3 ) 	 ; A 2 = s t r # 
 
 / / 8 0 0 A A 2 6 C : 	 c o p y   t o   f i n a l   l o c a t i o n 
 
 3 C 0 9 8 0 1 3 	 L U I 	 T 1 , 8 0 1 3 
 
 9 5 2 9 9 E 0 8 	 L H U 	 T 1 , 9 E 0 8   ( T 1 ) 	 ; T 1 = 8 0 1 2 9 E 0 8 :   
 
 3 C 0 5 8 0 1 3 	 L U I 	 A 1 , 8 0 1 3 
 
 2 4 A 5 9 E 0 0 	 A D D I U 	 A 1 , A 1 , 9 E 0 0 	 ; A 1 = 8 0 1 2 9 E 0 0 : 	 A 1 = p - > s o u r c e 
 
 2 6 0 4 0 0 0 4 	 A D D I U 	 A 0 , S 0 , 0 0 0 4 	 ; A 0 = S O + 4 : 	 A 0 = p - > t a r g e t   [ 8 0 1 3 0 D B C ] 
 
 0 C 0 2 5 3 C 1 	 J A L 	 8 0 0 9 4 F 0 4 	 ; R e d i r e c t   t o   8 0 0 9 9 8 C 0 ,   f o r c i n g   s t r i n g   s i z e = 6 
 
 A 6 0 9 0 0 0 2 	 S H 	 T 1 , 0 0 0 2   ( S 0 ) 	 ; [ 0 ] - > S 0 + 2 
 
 8 F B F 0 0 1 C 	 L W 	 R A , 0 0 1 C   ( S P ) 
 
 / / 8 0 0 A A 2 8 C : 	 r e t u r n 
 
 8 F B 0 0 0 1 8 	 L W 	 S 0 , 0 0 1 8   ( S P ) 
 
 2 7 B D 0 0 2 0 	 A D D I U 	 S P , S P , 0 0 2 0 
 
 0 3 E 0 0 0 0 8 	 J R 	 R A 
 
 0 0 0 0 0 0 0 0 	 N O P 
 
 
 
 
 
 
 
 o n   t a l k i n g   t o   a n   N P C : 
 
 c a l l s   8 0 0 C 3 F 7 0   f r o m   8 0 0 9 4 F 2 4   @   8 0 0 9 4 F 4 4 
 
 s t r   1 E 4 ,   l e n   A 
 
 c a l l e d   b y   8 0 2 B F A 8 C   @   8 0 2 B F A D 8 
 
 
 
 2 7 B D F F E 0 	 A D D I U 	 S P , S P , F F E 0 
 
 A F B 0 0 0 1 8 	 S W 	 S 0 , 0 0 1 8   ( S P ) 
 
 0 0 8 0 8 0 2 5 	 O R 	 S 0 , A 0 , R 0 	 ; S 0 = A 0 :   
 
 A F B F 0 0 1 C 	 S W 	 R A , 0 0 1 C   ( S P ) 
 
 A F A 7 0 0 2 4 	 S W 	 A 3 , 0 0 2 4   ( S P ) 
 
 / / 8 0 0 A A 2 3 0 : 
 
 2 4 0 1 0 0 0 E 	 A D D I U 	 A T , R 0 , 0 0 0 E 	 ; A T = E 
 
 3 0 A F F 0 0 0 	 * A N D I 	 T 7 , A 1 , F 0 0 0 	 ; T 7 = A 1   &   0 x 0 0 0 0 F 0 0 0 
 
 0 0 0 F C 3 0 3 	 S R A 	 T 8 , T 7 , 0 x C 	 ; T 8 = u p p e r   n i b b l e   o f   T 6 
 
 1 7 0 1 0 0 1 2 	 * B N E 	 T 8 , A T , 8 0 0 A A 2 8 4 	 ; q u i t   i f   = E 
 
 9 4 E 8 0 0 0 0 	 L H U 	 T 0 , 0 0 0 0   ( A 3 ) 
 
 / / 8 0 0 A A 2 4 8 : 
 
 A 6 0 8 0 5 2 0 	 S H 	 T 0 , 0 5 2 0   ( S 0 ) 	 ; S a v e   h a l f w o r d   - >   A 0 + 5 2 0 
 
 A 6 0 5 0 0 0 0 	 * S H 	 A 1 , 0 0 0 0   ( S 0 ) 
 
 A 2 0 6 0 0 0 B 	 S B 	 A 2 , 0 0 0 B   ( S 0 ) 	 ; S a v e   b y t e   - >   A 0 + B 
 
 2 4 0 5 0 0 0 7 	 * A D D I U 	 A 1 , R 0 , 0 0 0 7 	 ; A 1 = m a x   s t r l e n : 	 4 	 a c t u a l   m a x i m u m   = 7 
 
 2 6 0 4 0 4 E 5 	 A D D I U 	 A 0 , S 0 , 0 4 E 5 	 ; A 0 + = 4 E 5 :   p - > t a r g e t 
 
 0 C 0 2 6 6 4 B 	 J A L 	 8 0 0 9 9 9 2 C 	 ; m e m s e t   7   b y t e s 
 
 2 4 0 6 0 0 2 0 	 A D D I U 	 A 2 , R 0 , 0 0 2 0 
 
 8 F A 7 0 0 2 4 	 L W 	 A 3 , 0 0 2 4   ( S P ) 
 
 2 6 0 4 0 4 E 5 	 A D D I U 	 A 0 , S 0 , 0 4 E 5 	 ; A 0 + = 4 E 5 :   p - > t a r g e t 
 
 0 C 0 3 0 F D C 	 J A L 	 8 0 0 C 3 F 7 0 	 ; r e t r i e v e   s t r i n g   f r o m   s t r i n g _ t x t 
 
 9 4 E 6 0 0 0 2 	 L H U 	 A 2 , 0 0 0 2   ( A 3 ) 	 ; A 2 = s t r # 
 
 / / 8 0 0 A A 2 6 8 : 	 c o p y   t o   f i n a l   l o c a t i o n 
 
 3 C 0 5 8 0 1 3 	 L U I 	 A 1 , 8 0 1 3 
 
 2 4 A 5 9 E 0 0 	 A D D I U 	 A 1 , A 1 , 9 E 0 0 	 ; A 1 = 8 0 1 2 9 E 0 0 : 	 A 1 = p - > s o u r c e 
 
 9 4 A 9 0 0 0 8 	 * L H U 	 T 1 , 0 0 0 8   ( A 1 ) 	 ; T 1 = 8 0 1 2 9 E 0 8 :   
 
 2 6 0 4 0 0 0 4 	 A D D I U 	 A 0 , S 0 , 0 0 0 4 	 ; A 0 = S O + 4 : 	 A 0 = p - > t a r g e t   [ 8 0 1 3 0 D B C ] 
 
 2 4 0 6 0 0 0 7 	 A D D I U 	 A 2 , R 0 , 0 0 0 7 
 
 0 C 0 2 6 6 3 0 	 J A L 	 8 0 0 9 9 8 C 0 	 ; R e d i r e c t   t o   8 0 0 9 9 8 C 0 ,   f o r c i n g   s t r i n g   s i z e = 6 
 
 A 6 0 9 0 0 0 2 	 S H 	 T 1 , 0 0 0 2   ( S 0 ) 	 ; [ 0 ] - > S 0 + 2 
 
 / / 8 0 0 A A 2 8 4 : 	 r e t u r n 
 
 8 F B F 0 0 1 C 	 L W 	 R A , 0 0 1 C   ( S P ) 
 
 8 F B 0 0 0 1 8 	 L W 	 S 0 , 0 0 1 8   ( S P ) 
 
 2 7 B D 0 0 2 0 	 A D D I U 	 S P , S P , 0 0 2 0 
 
 0 3 E 0 0 0 0 8 	 J R 	 R A 
 
 0 0 0 0 0 0 0 0 	 N O P 
 
 N O P 
 
 N O P 
 
 
 
 t h i s   c a u s e d   a   s l i g h t   h o r r o r   -   n o w   e v e r y o n e   i s   B o b ! 
 
 b l o c k s   s t a r t   a t   8 0 1 3 1 2 E 0 ;   5 2 8   e a c h 
 
 8 0 1 3 1 2 E 0 
 
 8 0 1 3 1 8 0 8 
 
 
 
 
 
 8 0 1 4 2 5 C 0 	 S e l e c t _ t x t   b a n k 
 
 [ f l o a t s ] 
 
 0 x 3 4 	 0 x 2 8 	 s t r i n g   b u f f e r 
 
 0 x 5 C 	 0 x 4 	 s i z e   o f   s t r i n g   1 
 
 0 x 6 0 	 0 x 4 	 s i z e   o f   s t r i n g   2 
 
 0 x 6 4 	 0 x 4 	 s i z e   o f   s t r i n g   3 
 
 0 x 6 8 	 0 x 4 	 s i z e   o f   s t r i n g   4 
 
 0 x 6 C 	 0 x A 	 p r e v i o u s l y   s e l e c t e d   s t r i n g 
 
 0 x 7 8 	 0 x 4 	 s i z e   o f   p r e v i o u s l y   s e l e c t e d   s t r i n g 
 
 0 x 7 C 	 0 x 4 	 n u m b e r   o f   e n t r i e s   i n   c u r e n t   m e n u 
 
 0 x 8 0 	 0 x 4 	 c o p i e d   o p t i o n #   o r   - 1 
 
 0 x 8 4 	 0 x 4 	 s e l e c t e d   o p t i o n # 
 
 0 x D C 	 0 x 4 	 t e x t   c o n t r o l l e r   s w i t c h e s   + m a i n   b a n k   u s e s   t h i s   v a l u e ! + 
 
 0 x 1 4 0 	 v a r 	 b u f f e r   f o r   t e x t   c o p i e d   t o   0 x 3 4 
 
 
 
 n o t e   t h a t   t h e   s t r i n g   b u f f e r   i s   a l s o   u s e d   f o r   p l a y e r   n a m e   s t r i n g s   a t   s r a m   l o a d 
 
 c h a n g e   8 0 0 6 5 2 1 C 	 0 x 1 3 7 9 C 	 t o   A D D I U   V 1 , V 1 , 0 1 4 0 
 
 
 
 8 0 0 6 5 D D 0   w i l l   b e   u s e d   t o   c o p y   a   h a p p y   s t r i n g   i n   p l a c e   o f   f a i l u r e   t o   r e t r i e v e 
 
 n e w   s t r i n g s   w i l l   b e   1   b y t e   l o n g ,   c o n s i s t i n g   o f   a   s i n g l e   s p a c e 
 
 r e d i r e c t   b o t h   o v e r - c o d e   f a i l u r e s   t o   t h i s   r o u t i n e 
 
 
 
 8 0 0 A 0 F 1 4 	 4 F 4 9 4 	 0 0 D 1 8 8 2 1 	 A D D U 	 S 1 , A 2 , S 1 
 
 t h i s   i s   i n   t a n d e m   t o   s t r l e n   b e i n g   p a s s e d   b y   8 0 0 6 5 D 9 0 
 
 s h o u l d   c o r r e c t   l e n g t h s   w h e n   r e t r i e v i n g   f r o m   R O M 
 
 
 
 	 
 
 o k a y ,   t h i s   + d o e s n ' t +   a d d r e s s   t h e   p r o b l e m   o f   i t   c l a i m i n g   t h e   c o p i e d   s t r i n g   ( 8 0 1 4 2 5 F 4 )   i s   o n l y   0 x A   l o n g 
 
 t h i s   c a u s e s   t h e   n e x t   s t r i n g   t o   c o p y   o v e r   t h e   f i r s t . . .     A e g h ! 
 
 T H A T ' S   C O M P U T E D ! ?     A e g h . . . 
 
 # 8 0 0 6 5 1 F 8 	 0 x 1 3 7 7 8 	 c o p y   t o   b u f f e r 
 
 L W 	 T 1 , 0 0 2 8   ( S P ) 	 ; T 1   w a s   l e f t   u n c h a n g e d ,   s o   e x t r a n e o u s 
 
 L W 	 A 2 , 0 0 3 0   ( S P ) 
 
 L W 	 A 3 , 0 0 3 4   ( S P ) 
 
 S L L 	 T 8 , T 1 , 0 x 2 
 
 A D D U 	 T 8 , T 8 , T 1 
 
 S L L 	 T 8 , T 8 , 0 x 1 
 
 A D D U 	 V 1 , A 2 , T 8 
 
 # r e w r i t e : 
 
 8 F A 7 0 0 3 4 	 + L W 	 A 3 , 0 0 3 4   ( S P ) 
 
 	 L W 	 A 2 , 0 0 3 0   ( S P ) 
 
 1 0 0 9 0 0 0 3 	 B E Q 	 T 1 , R 0 , + 3 
 
 0 0 0 9 C 0 8 0 	 S L L 	 T 8 , T 1 , 0 x 2 
 
 0 0 D 8 C 0 2 1 	 A D D U 	 T 8 , A 2 , T 8 
 
 8 F 1 8 0 0 5 8 	 L W 	 T 8 , 0 0 5 8   ( T 8 ) 
 
 	 A D D U 	 V 1 , A 2 , T 8 
 
 
 
 l a s t   b i t   i s   r e a d   f r o m   b u f f e r .     n e e d   t o   g e t   i t   t o   d e t e c t   l e n g t h   o f   s t r i n g s 
 
 8 0 0 6 6 B B 0   c a l l s   8 0 0 9 0 E 1 C . . . 
 
 8 0 0 9 0 E 1 C   c a l l s   8 0 0 9 0 C C 0 . . . 
 
 8 0 0 9 0 C C 0   c a l l s   8 0 0 9 1 E 0 C . . . 
 
 8 0 0 9 1 E 0 C   c a l l s   8 0 0 9 1 C 9 8 . . . 
 
 8 0 0 9 1 C 9 8   r e a d s   c h a r a c t e r s   f r o m   s t r i n g   2 ;   s p e c i f i c l y ,   S 0 + 0 = t e x t   o f f s e t ,   S 0 + 2 C = c h a r a c t e r 
 
 8 0 0 9 0 3 4 C   r e a d s   i t   a g a i n ,   p r o c e s s e s   7 F / 8 0   c o m m a n d s 
 
 8 0 0 9 1 7 C 8   r e a d s   i t   a g a i n ,   p r o b a b l y   t o   d e t e r m i n e   w i d t h   ( f l o a t s   i n   h e r e ) 
 
 
 
 p a r t   o f   a   l o o p   -   I N C R E M E N T : 
 
 # 8 0 0 6 6 C E 8 : 	 0 x 1 5 2 6 8 	 c a l l   8 0 0 9 0 E 1 C   a n d   l o o p   i t   a p p a r e n t l y 
 
 O R 	 A 0 , S 6 , R 0 
 
 J A L 	 8 0 0 9 0 E 1 C 
 
 O R 	 A 1 , S 5 , R 0 
 
 A D D . S 	 F 2 0 , F 2 0 , F 2 6 
 
 L W 	 T 8 , 0 0 9 0   ( S P ) 
 
 A D D I U 	 S 1 , S 1 , 0 0 0 4 	 ; S 1 + 0 x 5 C = c u r r e n t   s t r i n g   l e n g t h   f r o m   i n d e x 
 
 A D D I U 	 S 5 , S 5 , 0 0 0 A 	 ; m a n u a l l y   a d v a n c e   1 0   s p a c e s   e a c h   e n t r y   ( c u r s e s ! ) 
 
 B N E L 	 S 1 , T 8 , 8 0 0 6 6 C 4 4 
 
 L W 	 T 2 , 0 0 9 C   ( S P ) 
 
 # r e w r i t e ! 	 0 x 1 5 2 7 C 
 
 	 A D D I U 	 S 1 , S 1 , 0 0 0 4 	 ; S 1 + 0 x 5 C = c u r r e n t   s t r i n g   l e n g t h   f r o m   i n d e x 
 
 8 E 2 A 0 0 5 8 	 * L W 	 T 2 , 0 0 5 8   ( S 1 ) 	 ; m a n u a l l y   a d v a n c e   1 0   s p a c e s   e a c h   e n t r y   ( c u r s e s ! ) 
 
 1 6 3 8 F F C E 	 + B N E 	 S 1 , T 8 , 8 0 0 6 6 C 4 0 
 
 0 1 5 5 A 8 2 1 	 * A D D U 	 S 5 , T 2 , S 5 
 
 
 
 o n l y   1 s t   l i n e   a p p e a r s . . .   p u l l s   s t r i n g   c o r r e c t l y ,   o v e r w r i t t i n g   o r i g i n a l   o n   s t a c k 
 
 8 0 0 A 0 F 1 4 	 4 F 4 9 4 	 0 0 D 1 8 8 2 1 	 A D D U 	 S 1 , A 2 , S 1 
 
 n o w ,   t o   a d d r e s s   t h e   t h i n g   t h a t   s e t s   o f f s e t   t o   e n t r y   3 - 4   w h e n   u s e d 
 
 
 
 @ 8 0 0 6 5 E E 4   c o u l d   s a v e   A 2 - > S P + 0 x ? ? 
 
 8 0 0 6 5 E E 4 	 1 4 4 6 4 	 A E 0 6 0 0 0 0 	 S W 	 A 2 , 0 0 0 0   ( S 0 ) 
 
 
 
 / / 8 0 0 A 0 E F 0 : 	 0 x 	 l o o p   t o   r e c a l l   t e x t 
 
 J A L 	 8 0 0 6 5 0 4 0 
 
 N O P 
 
 O R 	 A 0 , V 0 , R 0 
 
 O R 	 A 1 , S 1 , R 0 	 	 ; t a r g e t   c o p y   a d d r e s s 
 
 L W 	 A 2 , 0 0 0 0   ( S 0 ) 
 
 J A L 	 8 0 0 6 5 D 9 0 
 
 O R 	 A 3 , S 2 , R 0 
 
 A D D I U 	 S 0 , S 0 , 0 0 0 4 	 ; o f f s e t   t o   t h e   t x t #   i n   t a b l e ;   S P + 7 4   a s   b a s e 
 
 B N E 	 S 0 , S 3 , 8 0 0 A 0 E F 0 
 
 A D D I U 	 S 1 , S 1 , 0 0 0 A 	 - > A D D U 	 S 1 , A 2 , S 1 
 
 
 
 O h ,   t h i s   i s   f u n n y !     A f t e r   a l l   t h a t   f u s s ,   t h e y   + d e c l a r e +   t h e   s i z e   o f   t h e   s t r i n g !     A e g h ! 
 
 / / 8 0 0 A 0 F 1 8 : 
 
 S L T I 	 A T , S 4 , 0 0 0 3 
 
 B N E Z 	 A T , 8 0 0 A 0 F 3 0 	 ; b r a n c h   o n   1 , 2   e n t r i e s 
 
 O R 	 S 1 , R 0 , R 0 
 
 L U I 	 S 1 , 8 0 1 4 
 
 B E Q 	 R 0 , R 0 , 8 0 0 A 0 F 3 0 
 
 A D D I U 	 S 1 , S 1 , 2 7 1 4 	 ; 8 0 1 4 2 7 1 4 =   ' s t a r t '   o f   e n t r y   3 
 
 / / 8 0 0 A 0 F 3 0 : 
 
 S L T I 	 A T , S 4 , 0 0 0 4 
 
 B N E Z 	 A T , 8 0 0 A 0 F 4 8 	 ; b r a n c h   o n   1 , 2 , 3   e n t r i e s 
 
 O R 	 S 0 , R 0 , R 0 
 
 L U I 	 S 0 , 8 0 1 4 
 
 B E Q 	 R 0 , R 0 , 8 0 0 A 0 F 4 8 
 
 A D D I U 	 S 0 , S 0 , 2 7 1 E 	 ; 8 0 1 4 2 7 1 E =   ' s t a r t '   o f   e n t r y   4 
 
 / / 8 0 0 A 0 F 4 8 : 
 
 J A L 	 8 0 0 6 5 0 4 0 
 
 N O P 
 
 # 8 0 0 A 0 F 5 0 : 	 0 x 4 F 4 D 0 	 s e t   s o m e   s t u f f :   l e t s   h o p e   V 1   r e a l l y   d o e s n ' t   c h a n g e ! 
 
 L U I 	 A 1 , 8 0 1 4 
 
 L U I 	 A 3 , 8 0 1 4 
 
 A D D I U 	 T 2 , R 0 , 0 0 0 A 	 ; l e n g t h   o f   s t r i n g   2 
 
 A D D I U 	 T 3 , R 0 , 0 0 0 A 	 ; l e n g t h   o f   s t r i n g   3 
 
 A D D I U 	 T 4 , R 0 , 0 0 0 A 	 ; l e n g t h   o f   s t r i n g   4 
 
 S W 	 T 4 , 0 0 2 0   ( S P ) 
 
 S W 	 T 3 , 0 0 1 8   ( S P ) 
 
 S W 	 T 2 , 0 0 1 0   ( S P ) 
 
 A D D I U 	 A 3 , A 3 , 2 7 0 A 	 ; p - > s t r i n g   2 
 
 A D D I U 	 A 1 , A 1 , 2 7 0 0 	 ; p - > s t r i n g   1 
 
 O R 	 A 0 , V 0 , R 0 	 	 ; s t a r t   o f   s e l e c t _ m e n u   b a n k 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 A 	 ; l e n g t h   o f   s t r i n g   1 
 
 S W 	 S 1 , 0 0 1 4   ( S P ) 	 ; p - > s t r i n g   3   o r   N O P 
 
 J A L 	 8 0 0 6 5 2 7 8 
 
 S W 	 S 0 , 0 0 1 C   ( S P ) 	 ; p - > s t r i n g   4   o r   N O P 
 
 
 
 L a s t   j u m p   o u t .     T h i s   t h i n g   r e d i r e c t s   a   b i t . . . 
 
 / / 8 0 0 A 0 F 8 C : 	 0 x 
 
 L W 	 A 0 , 0 0 8 8   ( S P ) 
 
 J A L 	 8 0 0 9 D C 0 4 	 	 ; a d v a n c e   t o   n e x t   ' c h a r '   i n   c a l l e r   ( u s u a l l y   m s g _ t x t ) 
 
 L W 	 A 1 , 0 0 0 0   ( S 5 ) 
 
 	 A D D I U 	 S P , S P , F F E 8 
 
 	 S W 	 R A , 0 0 1 4   ( S P ) 
 
 	 O R 	 A 2 , A 0 , R 0 
 
 	 L W 	 A 0 , 0 0 0 C   ( A 2 ) 
 
 	 J A L 	 8 0 0 9 0 3 A 8 
 
 	 A D D I U 	 A 0 , A 0 , 0 0 1 0 
 
 	 	 A D D I U 	 S P , S P , F F E 8 
 
 	 	 S W 	 R A , 0 0 1 4   ( S P ) 
 
 	 	 O R 	 A 2 , A 0 , R 0 
 
 	 	 J A L 	 8 0 0 9 0 3 4 C 	 ; r e t u r n s   V 0 = s i z e   o f   c h a r a c t e r   o r   c o m m a n d 
 
 	 	 A D D I U 	 A 0 , A 2 , A 1 
 
 	 	 	 L B U 	 V 0 , 0 0 0 0   ( A 0 ) 	 ; c h a r a c t e r   f r o m   s t r i n g 
 
 	 	 	 A D D I U 	 A T , R 0 , 0 0 7 F 
 
 	 	 	 A D D I U 	 V 1 , R 0 , 0 0 0 1 
 
 	 	 	 B N E L 	 V 0 , A T , 8 0 0 9 0 3 9 0 	 ; q u i t   i f   n o t   a   7 F   c o m m a n d 
 
 	 	 	 A D D I U 	 A T , R 0 , 0 0 8 0 
 
 	 	 	 L B U 	 V 0 , 0 0 0 1   ( A 0 ) 	 ; 7 F   c o m m a n d   t y p e 
 
 	 	 	 B L T Z 	 V 0 , 8 0 0 9 0 3 8 4 	 ; h a n d l e   i n v a l i d 
 
 	 	 	 S L T I 	 A T , V 0 , 0 0 6 1 
 
 	 	 	 B E Q 	 A T , R 0 , 8 0 0 9 0 3 8 4 	 ; o n l y   0 - 6 0 
 
 	 	 	 S L L 	 T 6 , V 0 , 0 x 1 	 ; c o m m a n d   * 2 	 
 
 	 	 	 L U I 	 V 1 , 8 0 1 0 
 
 	 	 	 A D D U 	 V 1 , V 1 , T 6 	 	 ; 8 0 1 0 6 B F 4 + o f f s e t 
 
 	 	 	 B E Q 	 R 0 , R 0 , 8 0 0 9 0 3 9 C 
 
 	 	 	 L B 	 V 1 , 6 B F 4   ( V 1 ) 	 ; V 1 = s i z e   o f   c o m m a n d 
 
 	 / / 8 0 0 9 0 3 8 4 : 	 i n v a l i d   c o m m a n d s   g o   h e r e 
 
 	 	 	 B E Q 	 R 0 , R 0 , 8 0 0 9 0 3 9 C 	 ; a s s u m e   i t   i s   o n l y   2 - b y t e s 
 
 	 	 	 L B 	 V 1 , R 0 , 0 0 0 2 
 
 	 	 	 - A D D I U 	 A T , R 0 , 0 0 8 0 
 
 	 / / 8 0 0 9 0 3 9 0 : 
 
 	 	 	 B N E L 	 V 0 , A T , 8 0 0 9 0 3 A 0 
 
 	 	 	 O R 	 V 0 , V 1 , R 0 
 
 	 	 	 A D D I U 	 V 1 , R 0 , 0 0 0 2 	 ; 8 0   c o m m a n d s   a r e   2 - b y t e s 
 
 	 	 	 O R 	 V 0 , V 1 , R 0 
 
 	 / / 8 0 0 9 0 3 A 0 : 
 
 	 	 	 J R 	 R A 
 
 	 	 	 N O P 
 
 	 	 L W 	 R A , 0 0 1 4   ( S P ) 
 
 	 	 A D D I U 	 S P , S P , 0 0 1 8 
 
 	 	 J R 	 R A 
 
 	 	 N O P 
 
 	 L W 	 R A , 0 0 1 4   ( S P ) 
 
 	 A D D I U 	 S P , S P , 0 0 1 8 
 
 	 J R 	 R A 
 
 	 N O P 
 
 / / 8 0 0 A 0 F 9 8 	 0 x 	 p a c k   t h i n g s   u p 
 
 L W 	 T 5 , 0 0 0 0   ( S 5 ) 	 ; T 5 = c u r r e n t   p o s i t i o n   i n   o r i g i n a l   t e x t 
 
 A D D U 	 T 6 , T 5 , V 0 	 	 ; T 6 = i n c r e m e n t e d   p o s i t i o n 
 
 S W 	 T 6 , 0 0 0 0   ( S 5 ) 	 ; s a v e   n e w   p o s i t i o n 
 
 O R 	 V 0 , R 0 , R 0 
 
 L W 	 R A , 0 0 4 4   ( S P ) 
 
 L W 	 S 0 , 0 0 2 C   ( S P ) 
 
 L W 	 S 1 , 0 0 3 0   ( S P ) 
 
 L W 	 S 2 , 0 0 3 4   ( S P ) 
 
 L W 	 S 3 , 0 0 3 8   ( S P ) 
 
 L W 	 S 4 , 0 0 3 C   ( S P ) 
 
 L W 	 S 5 , 0 0 4 0   ( S P ) 
 
 J R 	 R A 
 
 A D D I U 	 S P , S P , 0 0 8 8 
 
 
 
 # w e l l ,   e i t h e r   S P + 4   i s   l e n g t h   o r   V 1   i s   a l w a y s   t h e   e n d .     M a y b e . . . 
 
 # r e w r i t e ! 	 i n e f f i c i e n t ,   b u t   s a v e s   a n n o y a n c e   o f   a l t e r i n g   b r a n c h e s . . . 
 
 / / 8 0 0 A 0 F 1 8 : 	 0 x 4 F 4 9 8 
 
 0 C 0 1 9 4 1 0 	 J A L 	 8 0 0 6 5 0 4 0 
 
 0 0 0 0 0 0 0 0 	 N O P 
 
 0 0 0 0 8 8 2 5 	 O R 	 S 1 , R 0 , R 0 
 
 0 0 0 0 8 0 2 5 	 O R 	 S 0 , R 0 , R 0 
 
 3 C 0 5 8 0 1 4 	 L U I 	 A 1 , 8 0 1 4 
 
 2 4 A 5 2 7 0 0 	 A D D I U 	 A 1 , A 1 , 2 7 0 0 	 ; p - > s t r i n g   1 
 
 8 F A 6 0 0 7 4 	 L W 	 A 2 , 0 0 7 4   ( S P ) 	 ; l e n g t h   o f   s t r i n g   1 
 
 8 F A A 0 0 7 8 	 L W 	 T 2 , 0 0 7 8   ( S P ) 	 ; l e n g t h   o f   s t r i n g   2 
 
 8 F A B 0 0 7 C 	 L W 	 T 3 , 0 0 7 C   ( S P ) 	 ; l e n g t h   o f   s t r i n g   3 
 
 8 F A C 0 0 8 0 	 L W 	 T 4 , 0 0 8 0   ( S P ) 	 ; l e n g t h   o f   s t r i n g   4 
 
 0 0 C 5 3 8 2 1 	 * A D D U 	 A 3 , A 2 , A 1 	 	 ; p - > s t r i n g   2 
 
 2 A 8 1 0 0 0 3 	 S L T I 	 A T , S 4 , 0 0 0 3 
 
 5 0 2 0 0 0 0 1 	 * B E Q L 	 A T , R 0 , + 1 	 ; b r a n c h   o n   1 , 2   e n t r i e s 
 
 0 1 4 7 8 8 2 1 	 * A D D U 	 S 1 , T 2 , A 3 	 	 ; p - > s t r i n g   3 
 
 0 0 0 0 0 0 0 0 	 N O P 
 
 0 0 0 0 0 0 0 0 	 N O P 
 
 / / 8 0 0 A 0 F 5 8 : 
 
 2 A 8 1 0 0 0 4 	 S L T I 	 A T , S 4 , 0 0 0 4 
 
 5 0 2 0 0 0 0 1 	 * B E Q L 	 A T , R 0 , + 1 	 ; b r a n c h   o n   1 , 2 , 3   e n t r i e s 
 
 0 1 9 1 8 0 2 1 	 * A D D U 	 S 0 , T 4 , S 1 
 
 0 0 0 0 0 0 0 0 	 N O P 
 
 0 0 0 0 0 0 0 0 	 N O P 
 
 / / 8 0 0 A 0 F 4 8 : 
 
 # 8 0 0 A 0 F 6 C : 	 0 x 4 F 4 D 0 	 s e t   s o m e   s t u f f :   l e t s   h o p e   V 1   r e a l l y   d o e s n ' t   c h a n g e ! 
 
 0 0 0 0 0 0 0 0 	 N O P 
 
 A F A C 0 0 2 0 	 S W 	 T 4 , 0 0 2 0   ( S P ) 
 
 A F A B 0 0 1 8 	 S W 	 T 3 , 0 0 1 8   ( S P ) 
 
 A F A A 0 0 1 0 	 S W 	 T 2 , 0 0 1 0   ( S P ) 
 
 0 0 4 0 2 0 2 5 	 O R 	 A 0 , V 0 , R 0 
 
 A F B 1 0 0 1 4 	 S W 	 S 1 , 0 0 1 4   ( S P ) 	 ; p - > s t r i n g   3   o r   N O P 
 
 0 C 0 1 9 4 9 E 	 J A L 	 8 0 0 6 5 2 7 8 
 
 A F B 0 0 0 1 C 	 S W 	 S 0 , 0 0 1 C   ( S P ) 	 ; p - > s t r i n g   4   o r   N O P 
 
 
 
 O k a y ,   r e w r i t e   w o r k s   f i n e   f o r   a l l   b u t   1 s t   m e n u ! 
 
 f i r s t   m e n u ' s   s e c o n d   o p t i o n   i s   e r r o n e o u s   ( t h i n k s   i t s   1 D D ) 
 
 o p t i o n   b e c o m e s   s i z e ,   c a u s e s   a   c r a s h .     E a s y   e n o u g h   t o   f i x   i n   t h e   s c r i p t 
 
 
 
 a n o t h e r   r e w r i t e ,   e n t i r e l y   o m i t t i n g   t h e   i n s a n i t y   o f   t h e   l a s t   o n e 
 
 m a n u a l l y   s e t s   s i z e s   h e r e ,   d o e s n ' t   b o t h e r   t e s t i n g   f o r   t e r m i n a t i n g   s p a c e s 
 
 a c c e p t s   t h a t   t h e   t e x t   w i l l   p r o b a b l y   a l w a y s   b e   i n   t h e   ' b u f f e r '   a r e a   -   + 0 x 1 4 0 
 
 # r e w r i t e ! 	 i n e f f i c i e n t ,   b u t   s a v e s   a n n o y a n c e   o f   a l t e r i n g   b r a n c h e s . . . 
 
 / / 8 0 0 A 0 E C 4 : 	 4 F 4 4 4 
 
 B N E Z 	 A T , 8 0 0 A 0 F 8 C 	 - > 	 8 0 0 A 0 F 6 4 	 1 4 2 0 0 0 2 7 
 
 - 
 
 B E Q 	 A T , R 0 , 8 0 0 A 0 F 8 C 	 - > 	 8 0 0 A 0 F 6 4 	 1 0 2 0 0 0 2 5 
 
 / / 8 0 0 A 0 F 2 0 : 	 0 x 4 F 4 A 0 
 
 0 0 0 0 5 8 2 5 	 * O R 	 T 3 , R 0 , R 0 
 
 0 0 0 0 6 0 2 5 	 * O R 	 T 4 , R 0 , R 0 
 
 3 C 0 5 8 0 1 4 	 L U I 	 A 1 , 8 0 1 4 
 
 2 4 A 5 2 5 C 0 	 * A D D I U 	 A 1 , A 1 , 2 5 C 0 	 ; p - > b a s e 
 
 8 F A 6 0 0 7 4 	 L W 	 A 2 , 0 0 7 4   ( S P ) 	 ; l e n g t h   o f   s t r i n g   1 
 
 8 F A A 0 0 7 8 	 L W 	 T 2 , 0 0 7 8   ( S P ) 	 ; l e n g t h   o f   s t r i n g   2 
 
 2 A 8 1 0 0 0 3 	 S L T I 	 A T , S 4 , 0 0 0 3 
 
 5 0 2 0 0 0 0 1 	 B E Q L 	 A T , R 0 , + 1 	 ; b r a n c h   o n   1 , 2   e n t r i e s 
 
 8 F A B 0 0 7 C 	 L W 	 T 3 , 0 0 7 C   ( S P ) 	 ; l e n g t h   o f   s t r i n g   3 
 
 2 A 8 1 0 0 0 4 	 S L T I 	 A T , S 4 , 0 0 0 4 
 
 5 0 2 0 0 0 0 1 	 B E Q L 	 A T , R 0 , + 1 	 ; b r a n c h   o n   1 , 2 , 3   e n t r i e s 
 
 8 F A C 0 0 8 0 	 L W 	 T 4 , 0 0 8 0   ( S P ) 	 ; l e n g t h   o f   s t r i n g   4 
 
 A C B 4 0 0 7 C 	 * S W 	 S 4 , 0 0 7 C   ( A 1 ) 	 ; s a v e   # e n t r i e s 
 
 A C A C 0 0 6 8 	 * S W 	 T 4 , 0 0 6 8   ( A 1 ) 	 ; s a v e   s t r l e n s 
 
 A C A B 0 0 6 4 	 * S W 	 T 3 , 0 0 6 4   ( A 1 ) 
 
 A C A A 0 0 6 0 	 * S W 	 T 2 , 0 0 6 0   ( A 1 ) 
 
 A C A 6 0 0 5 C 	 * S W 	 A 2 , 0 0 5 C   ( A 1 ) 
 
 / / 8 0 0 A 0 F 6 4 : 
 
 8 F A 4 0 0 8 8 	 E T C 
 
 0 C 0 2 7 7 0 1 	 E T C 
 
 8 E A 5 0 0 0 0 	 E T C 
 
 8 E A D 0 0 0 0 	 E T C 
 
 0 1 A 2 7 0 2 1 	 E T C 
 
 A E A E 0 0 0 0 	 E T C 
 
 0 0 0 0 1 0 2 5 	 E T C 
 
 8 F B F 0 0 4 4 	 E T C 
 
 8 F B 0 0 0 2 C 	 E T C 
 
 8 F B 1 0 0 3 0 	 E T C 
 
 8 F B 2 0 0 3 4 
 
 8 F B 3 0 0 3 8 
 
 8 F B 4 0 0 3 C 
 
 8 F B 5 0 0 4 0 
 
 0 3 E 0 0 0 0 8 
 
 2 7 B D 0 0 8 8 
 
 
 
 * * * D O   T H I S   S T U F F   S T I L L * * * 
 
 f o r   t h e   r e c o r d ,   t h e   w i d t h s   a r e   a l l   w r o n g .     m u s t   c o r r e c t 
 
 n o w ,   j u s t   c h a n g e   E v E r Y t H i N g   t h a t   e x p e c t s   t e x t   a t   0 x 3 4   t o   0 x 1 4 0   0 . o 
 
 / / 8 0 0 6 5 3 6 C : 	 1 3 8 E C 
 
 A D D I U 	 S 1 , A 0 , 0 0 3 4 	 - > 	 0 1 4 0 
 
 / / 8 0 0 6 6 C 3 8 : 	 0 x 1 5 1 B 8 	 
 
 2 6 1 5 0 1 4 0 	 A D D I U 	 S 5 , S 0 , 0 1 4 0 
 
 
 
 8 0 0 6 6 1 3 0 	 s e t   e v e r y t h i n g   s o   y o u   c a n   c o p y   t h e   s e l e c t e d   s e l e c t _ t x t   m e n u   o p t i o n 
 
 A D D I U 	 S P , S P , F F E 0 
 
 S W 	 R A , 0 0 1 4   ( S P ) 
 
 O R 	 A 3 , A 0 , R 0 	 	 ; b a s e   f o r   t h e   m e n u   c o d e 
 
 L W 	 V 1 , 0 0 8 4   ( A 3 ) 	 ; V 1 = s e l e c t e d   o p t i o n # 
 
 S W 	 A 3 , 0 0 2 0   ( S P ) 
 
 A D D I U 	 A 1 , A 3 , 0 0 6 C 	 ; A 1 = t a r g e t   l o c a t i o n 
 
 S L L 	 T 6 , V 1 , 0 x 2 
 
 A D D U 	 T 6 , T 6 , V 1 
 
 S L L 	 T 6 , T 6 , 0 x 1 
 
 A D D U 	 A 0 , A 3 , T 6 
 
 A D D I U 	 A 0 , A 0 , 0 0 3 4 	 ; A 0 = s o u r c e   s t r i n g 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 A 	 ; m a n u a l   s t r l e n 
 
 J A L 	 8 0 0 3 6 0 E 0 
 
 S W 	 V 1 , 0 0 1 8   ( S P ) 
 
 / / 8 0 0 6 6 1 6 8 : 
 
 L W 	 V 1 , 0 0 1 8   ( S P ) 	 ; V 1 = s e l e c t e d   a g a i n 
 
 L W 	 A 3 , 0 0 2 0   ( S P ) 	 ; A 3 = b a s e   a g a i n 
 
 S L L 	 T 7 , V 1 , 0 x 2 
 
 A D D I U 	 V 0 , A 3 , 0 0 3 4 	 ; V 0 = s o u r c e   a g a i n 
 
 A D D U 	 T 8 , V 0 , T 7 	 	 ; T 8 = o f f s e t   t o   s t r l e n   f o r   s e l e c t e d ,   - 0 x 2 8 
 
 L W 	 T 9 , 0 0 2 8   ( T 8 ) 	 ; T 9 = s t r l e n   f o r   s e l e c t e d 
 
 S W 	 V 1 , 0 0 4 C   ( V 0 ) 	 ; s a v e   s e l e c t e d   t o   b a s e + 0 x 8 0 
 
 S W 	 T 9 , 0 0 4 4   ( V 0 ) 	 ; s a v e   s t r l e n   f o r   c o p y   t o   b a s e   + 0 x 7 8 
 
 L W 	 R A , 0 0 1 4   ( S P ) 
 
 J R 	 R A 
 
 A D D I U 	 S P , S P , 0 0 2 0 
 
 
 
 8 0 0 3 6 0 E 0 	 c o p y   t h e   s e l e c t e d   s t r i n g   i n t o   t h e   s e l e c t e d   b u f f e r 
 
 B E Q 	 A 2 , R 0 , 8 0 0 3 6 1 4 C 
 
 O R 	 A 3 , A 1 , R 0 
 
 B E Q 	 A 0 , A 1 , 8 0 0 3 6 1 4 C 
 
 S L T 	 A T , A 1 , A 0 
 
 B N E L 	 A T , R 0 , 8 0 0 3 6 1 1 4 
 
 S L T I 	 A T , A 2 , 0 0 1 0 	 - > 	 0 0 2 8 	 ; f o r   n e w   l o c a t i o n 
 
 A D D 	 V 0 , A 0 , A 2 
 
 S L T 	 A T , A 1 , V 0 
 
 B E Q L 	 A T , R 0 , 8 0 0 3 6 1 1 4 
 
 S L T I 	 A T , A 2 , 0 0 1 0 	 - > 	 0 0 2 8 
 
 B E Q 	 R 0 , R 0 , 8 0 0 3 6 2 7 8 
 
 S L T I 	 A T , A 2 , 0 0 1 0 	 - > 	 0 0 2 8 
 
 - S L T I 	 A T , A 2 , 0 0 1 0 	 - > 	 0 0 2 8 
 
 / / 8 0 0 3 6 1 1 4 : 
 
 B N E Z 	 A T , 8 0 0 3 6 1 2 C 
 
 N O P 
 
 A N D I 	 V 0 , A 0 , 0 0 0 3 
 
 A N D I 	 V 1 , A 1 , 0 0 0 3 
 
 B E Q 	 V 0 , V 1 , 8 0 0 3 6 1 5 4 
 
 N O P 
 
 / / 8 0 0 3 6 1 2 C 
 
 B E Q 	 A 2 , R 0 , 8 0 0 3 6 1 4 C 
 
 N O P 
 
 A D D U 	 V 1 , A 0 , A 2 
 
 / / 8 0 0 3 6 1 3 8 : 	 L O O P U S   T O   C O P Y 
 
 L B 	 V 0 , 0 0 0 0   ( A 0 ) 
 
 A D D I U 	 A 0 , A 0 , 0 0 0 1 
 
 A D D I U 	 A 1 , A 1 , 0 0 0 1 
 
 B N E 	 A 0 , V 1 , 8 0 0 3 6 1 3 8 
 
 S B 	 V 0 , F F F F   ( A 1 ) 
 
 / / 8 0 0 3 6 1 4 C : 
 
 J R 	 R A 
 
 O R 	 V 0 , A 3 , R 0 
 
 
 
 # r e w r i t e 	 t o   n e w   l o c a t i o n ! 
 
 # 8 0 0 6 6 1 3 0 	 0 x 1 4 6 B 0 
 
 	 A D D I U 	 S P , S P , F F E 0 
 
 	 S W 	 R A , 0 0 1 4   ( S P ) 
 
 	 O R 	 A 3 , A 0 , R 0 	 	 ; b a s e   f o r   t h e   m e n u   c o d e 
 
 	 L W 	 V 1 , 0 0 8 4   ( A 3 ) 	 ; V 1 = s e l e c t e d   o p t i o n #   ( 0 - 3 ) 
 
 	 S W 	 A 3 , 0 0 2 0   ( S P ) 
 
 A C E 3 0 0 8 0 	 * S W 	 V 1 , 0 0 8 0   ( A 3 ) 	 ; s a v e   s e l e c t e d   t o   b a s e + 0 x 8 0 
 
 2 4 E 5 0 0 3 4 	 * A D D I U 	 A 1 , A 3 , 0 0 3 4 	 ; A 1 = t a r g e t   l o c a t i o n 
 
 2 4 E 4 0 1 4 0 	 * A D D I U 	 A 0 , A 3 , 0 1 4 0 	 ; A 0 = s t r i n g s 
 
 2 4 0 F F F F F 	 * A D D I U 	 T 7 , R 0 , F F F F 	 ; T 7 = c o u n t e r 
 
 2 5 E F 0 0 0 1 	 * A D D I U 	 T 7 , T 7 , 0 0 0 1 	 ; c o u n t e r + + 
 
 0 0 0 F 7 0 8 0 	 * S L L 	 T 6 , T 7 , 0 x 2 	 ; T 6 = o p t i o n # - > o f f s e t 
 
 0 0 E E 7 0 2 1 	 * A D D U 	 T 6 , T 6 , A 3 	 	 ; T 6 = b a s e + o f f s e t   t o   s t r l e n 
 
 8 D C 6 0 0 5 C 	 * L W 	 A 2 , 0 0 5 C   ( T 6 ) 	 ; A 2 = s t r l e n 
 
 5 4 6 F F F F B 	 * B N E L 	 V 1 , T 7 , F F F B 
 
 0 0 C 4 2 0 2 1 	 * A D D U 	 A 0 , A 0 , A 2 	 	 ; A 0 = b a s e + r u n n i n g   t o t a l 
 
 0 C 0 0 D 8 3 8 	 J A L 	 8 0 0 3 6 0 E 0 
 
 A C E 6 0 0 7 8 	 * S W 	 A 2 , 0 0 7 8   ( A 3 ) 	 ; s t r l e n   o f   c o p y 
 
 / / 8 0 0 6 6 1 6 8 : 
 
 8 F B F 0 0 1 4 	 L W 	 R A , 0 0 1 4   ( S P ) 
 
 0 3 E 0 0 0 0 8 	 J R 	 R A 
 
 2 7 B D 0 0 2 0 	 A D D I U 	 S P , S P , 0 0 2 0 	 * N O P 
 
 	 * N O P 
 
 	 * N O P 
 
 	 * N O P 
 
 	 * N O P 
 
 
 
 
 
 r o u t i n e s   t h e m s e l v e s : 
 
 8 0 0 9 E 5 5 8 	 4 C A D 8 	 m s g _ m a i n 
 
 8 0 0 6 5 D 9 0 	 	 s e l e c t 
 
 	 	 8 0 0 6 5 5 2 8 	 1 3 A A 8 	 p r o c e s s   t b l   i n d e p e n d e n t l y 
 
 	 	 
 
 + - + - + 
 
 
 
 8 0 0 3 6 0 E 0 : 	 t h i n g   t h a t   c o p i e s   ( s a v e s )   t h e   s e l e c t e d   s t r i n g 
 
 m o r e   s p e c i f i c l y ,   t h i s : 
 
 A D D U 	 V 1 , A 0 , A 2 	 	 ; V 1 = o f f s e t   t o   s t r i n g   ( A 0 )   +   s i z e 0 x A   ( A 2 ) 
 
 # 8 0 0 3 6 1 3 8 	 	 C O P Y   T H E   S T R I N G 
 
 L B 	 V 0 , 0 0 0 0   ( A 0 ) 	 ; V 0 = s o u r c e   b y t e 
 
 A D D I U 	 A 0 , A 0 , 0 0 0 1 	 ; m o v e   i n d e x   f o r   s o u r c e 
 
 A D D I U 	 A 1 , A 1 , 0 0 0 1 	 ; m o v e   i n d e x   f o r   t a r g e t 
 
 B N E 	 A 0 , V 1 , 8 0 0 3 6 1 3 8 	 ; k e e p   g o i n g   i f   c u r r e n t   ( A 0 )   ! =   e n d   ( V 1 ) 
 
 S B 	 V 0 , F F F F   ( A 1 ) 	 ; s a v e   t o   t a r g e t 
 
 # 8 0 0 3 6 1 4 C 	 	 r e t u r n   a n d   s a v e   s i z e 
 
 J R 	 R A 
 
 O R 	 V 0 , A 3 , R 0 
 
 
 
 c a l l e d   b y   8 0 0 6 6 1 3 0 - 8 0 0 6 6 1 9 0 
 
 m a n u a l l y   c a l c u l a t e s   o f f s e t ,   s e t s   s i z e 
 
 
 
 + - + - + 
 
 	 
 
 B e l o w   i s   i n t e r e s t i n g ,   b u t   I   w a s   s o r t   o f   o v e r s h o o t i n g   w i t h   i t . . . 
 
 + + + + + + + + + + + + + + 
 
 
 
 r e t u r n   f r o m   t a b l e   e n t r y   #   p u l l ,   g r a b b i n g   r o m   a d d r e s s . . . 
 
 
 
 8 0 0 2 6 8 2 8 : 
 
 . . . 
 
 / / 8 0 0 2 6 8 D C : 	 g r a b   r o m   a d d r e s s   ( t b l )   o n   h i t 
 
 L W 	 T 8 , 0 0 0 8   ( V 0 ) 	 T 8 = R O M   f o r   T B L 
 
 L W 	 T 2 , 0 0 0 0   ( V 0 ) 	 T 2 = s t a r t   c o d e w o r d 
 
 L W 	 A 1 , 0 0 3 8   ( S P ) 	 [ A 1 = 8 0 1 4 7 8 5 0 ] 
 
 A D D U 	 T 9 , T 8 , T 1 	 T 9 = R O M   +   c o d e w o r d   ( T 1 ) 
 
 L W 	 A 2 , 0 0 3 4   ( S P ) 	 [ A 2 = 8 ] 
 
 J A L 	 8 0 0 2 6 5 0 0 	 l o a d s   r o m   d a t a ;   C A R T _ A D D R = A 0 ,   D R A M _ A D D R = A 1 ,   W R _ L E N = A 2 
 
 S U B U 	 A 0 , T 9 , T 2 	 A 0 = a c t u a l   r o m   a d d r e s s   ( R O M   +   c o d e w o r d   -   s t a r t _ c o d e w o r d ) 
 
 / / 8 0 0 2 6 8 F 8 : 
 
 B E Q 	 R 0 , R 0 , 8 0 0 2 6 9 D 4 
 
 L W 	 R A , 0 0 1 C   ( S P ) 
 
 . . . 
 
 / / 8 0 0 2 6 9 D 4 : 	 r e t u r n . . . 
 
 L W 	 S 0 , 0 0 1 8   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 4 0 
 
 J R 	 R A 
 
 N O P 
 
 
 
 - 
 
 8 0 0 2 6 9 E 4 : 	 t e x t   r e c a l l ,   o r   s o m e t h i n g   l i k e   t h a t 
 
 . . . 
 
 / / 8 0 0 2 6 A 0 C : 
 
 O R 	 A 1 , S 2 , R 0 
 
 J A L 	 8 0 0 2 D F A 0 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 1 	 A 2 = 1 
 
 / / 8 0 0 2 6 A 1 8 : 
 
 L W 	 A 0 , 0 0 3 4   ( S P ) 
 
 B E Q L 	 A 0 , R 0 , 8 0 0 2 6 A 5 0 
 
 	 L W 	 R A , 0 0 2 4   ( S P ) 
 
 J A L 	 8 0 0 2 6 8 2 8 	 p u l l   d a t a   f o r   s p e c i f i c   c o d e w o r d ? ;   R E T U R N S   A 0 = a d d r e s s   o f   d a t a 
 
 O R 	 S 0 , A 0 , R 0 
 
 / / 8 0 0 2 6 A 2 C : 
 
 L W 	 A 0 , 0 0 1 8   ( S 0 ) 	 [ A 0 = 8 0 1 4 7 8 1 8 = 8 0 1 4 7 7 E 4 ] 
 
 B E Q L 	 A 0 , R 0 , 8 0 0 2 6 A 0 C 	 I F   N O T   P O I N T E R ,   T R Y   T R Y   A G A I N 
 
 	 O R 	 A 0 , S 1 , R 0 	 [ A 0 = S 1 = 8 0 0 3 F F 6 0   -   P R O B A B L Y   I N   S T A C K ] 
 
 L W 	 A 1 , 0 0 1 C   ( S 0 ) 	 [ A 1 = 8 0 1 4 7 8 1 C = 0 ] 
 
 J A L 	 8 0 0 2 D B 2 0 	 
 
 O R 	 A 2 , R 0 , R 0 	 A 2 = 0 
 
 B E Q 	 R 0 , R 0 , 8 0 0 2 6 A 0 C 	 
 
 O R 	 A 0 , S 1 , R 0 
 
 L W 	 R A , 0 0 2 4   ( S P ) 
 
 / / 8 0 0 2 6 A 5 0 : 	 r e t u r n . . . 
 
 L W 	 S 0 , 0 0 1 8   ( S P ) 
 
 L W 	 S 1 , 0 0 1 C   ( S P ) 
 
 L W 	 S 2 , 0 0 2 0   ( S P ) 
 
 J R 	 R A 
 
 A D D I U 	 S P , S P , 0 0 3 8 
 
 
 
 - - - - - - - - - - - - - - - - - - - - - - - 
 
 8 0 0 2 6 E 1 0 : 	 c a l l e d   b y   a l l   r e c a l l   r o u t i n e s   t o   e x t r a c t   d a t a   f r o m   R O M 
 
 	 a c c e p t s :   A 0 = p - > t a r g e t ,   A 1 = c o d e w o r d ,   A 2 = s t r l e n ,   A 3 = p - > d e b u g   s t r i n g ,   S P + 1 0 = d e b u g   e r r c o d e ( ? ) 
 
 A D D I U 	 S P , S P , F F 9 0 
 
 S W 	 R A , 0 0 2 4   ( S P ) 
 
 S W 	 A 0 , 0 0 7 0   ( S P ) 	 s a v e   t a r g e t   [ 8 0 1 4 2 0 0 0 ] 
 
 S W 	 A 1 , 0 0 7 4   ( S P ) 	 s a v e   c o d e w o r d   [ C 1 B 0 0 8 ] 
 
 S W 	 A 2 , 0 0 7 8   ( S P ) 	 s a v e   s t r l e n   [ 1 A 8 ] 
 
 L W 	 T 6 , 0 0 8 0   ( S P ) 	 [ 3 C 2   -   s e t   f r o m   p r i o r   r o u t i n e ] 
 
 S W 	 A 3 , 0 0 5 C   ( S P ) 	 [ 8 0 1 1 7 2 8 0 :   f i l e n a m e   s t r i n g   -   s e t   f r o m   p r i o r   r o u t i n e ] 
 
 A D D I U 	 A 0 , S P , 0 0 3 4 
 
 A D D I U 	 A 1 , S P , 0 0 3 0 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 1 	 A 2 = 1 
 
 J A L 	 8 0 0 3 4 D 6 0 	 S E T   S O M E   S T O C K   D E F A U L T   V A L U E S ? 
 
 S W 	 T 6 , 0 0 6 0   ( S P ) 
 
 / / 8 0 0 2 6 E 4 0 : 
 
 A D D I U 	 T 7 , S P , 0 0 3 4 	 # s a m e   a s   A 0   f r o m   b e f o r e 
 
 S W 	 T 7 , 0 0 1 4   ( S P ) 	 s a v e   p a t h   t o   d a t a   j u s t   c o p i e d   t o   s t a c k 
 
 A D D I U 	 A 0 , S P , 0 0 5 0 
 
 L W 	 A 1 , 0 0 7 0   ( S P ) 	 A 1 = t a r g e t 
 
 L W 	 A 2 , 0 0 7 4   ( S P ) 	 A 2 = c o d e w o r d 
 
 L W 	 A 3 , 0 0 7 8   ( S P ) 	 A 3 = s t r l e n 
 
 S W 	 R 0 , 0 0 1 0   ( S P ) 
 
 J A L 	 8 0 0 2 6 A 6 4 
 
 S W 	 R 0 , 0 0 1 8   ( S P ) 
 
 / / 8 0 0 2 6 E 6 4 : 
 
 A D D I U 	 A T , R 0 , F F F F 
 
 B N E 	 V 0 , A T , 8 0 0 2 6 E 7 8 
 
 A D D I U 	 A 0 , S P , 0 0 3 4 
 
 B E Q 	 R 0 , R 0 , 8 0 0 2 6 E 8 C 
 
 L W 	 R A , 0 0 2 4   ( S P ) 
 
 / / 8 0 0 2 6 E 7 8 : 
 
 O R 	 A 1 , R 0 , R 0 
 
 J A L 	 8 0 0 2 D F A 0 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 1 
 
 / / 8 0 0 2 6 E 8 4 : 
 
 O R 	 V 0 , R 0 , R 0 
 
 L W 	 R A , 0 0 2 4   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 7 0 
 
 J R 	 R A 
 
 N O P 
 
 
 
 + + + 
 
 8 0 0 3 4 D 6 0 : 	 t h e y ' r e   m e m o r y   a l l o c a t i o n   v a l u e s   o f   s o m e   s o r t 
 
 	 a c c e p t s :   A 0 = p - > e n t r y ,   A 1 = p - > d a t a ? ,   A 2 = f l a g ?   v a l u e ? 
 
 L U I 	 T 6 , 8 0 0 4 
 
 L U I 	 T 7 , 8 0 0 4 
 
 A D D I U 	 T 6 , T 6 , C E 2 0 	 ; T 6 = 8 0 0 3 C E 2 0 
 
 A D D I U 	 T 7 , T 7 , C E 2 0 	 ; T 7 = 8 0 0 3 C E 2 0 
 
 S W 	 T 6 , 0 0 0 0   ( A 0 ) 	 ; T 6 - > e n t r y + 0 :   
 
 S W 	 T 7 , 0 0 0 4   ( A 0 ) 	 ; T 7 - > e n t r y + 4 :   
 
 S W 	 R 0 , 0 0 0 8   ( A 0 ) 	 ; 0 - > e n t r y + 8 :   
 
 S W 	 R 0 , 0 0 0 C   ( A 0 ) 	 ; 0 - > e n t r y + C :   
 
 S W 	 A 2 , 0 0 1 0   ( A 0 ) 	 ; A 2 - > e n t r y + 1 0 :   s i z e   i n   d o u b l e w o r d s ?     v a l i d i t y   f l a g ? 
 
 J R 	 R A 
 
 S W 	 A 1 , 0 0 1 4   ( A 0 ) 	 ; A 1 - > e n t r y + 1 4 :   p - > d a t a ? 
 
 
 
 - - - - - - - - - - - - - - - - - - - - - - - 
 
 8 0 0 2 6 5 0 0 : 	 l o a d   t h e   r o m   d a t a 
 
 	 C A R T _ A D D R = A 0 ,   D R A M _ A D D R = A 1 ,   W R _ L E N = A 2 
 
 . . . 
 
 S O M E W H E R E   A L O N G   T H E   L I N E   8 0 0 3 2 2 6 C   C A L L S   r o m   l o a d   r o u t i n e 
 
 [ 8 0 1 4 7 8 5 0   =   R O M   A E 8 2 E 8 ,   s i z e   8   -   a n   e n t r y   i n   t h e   m s g . t b l ] 
 
 
 
 = _ = 
 
 
 
 F o r   l a c k   o f   a   b e t t e r   p l a c e   t o   p u t   t h i s : 
 
 m a p   c o l u m n   w i l l   n o w   u s e   l e t t e r s   ( t o   a v o i d   c h a n g i n g   2 0 0 +   l i n e s   o f   t e x t ) 
 
 T h a n k f u l l y   t h e r e ' s   a l r e a d y   t w o   s e t s .     J u s t   n e e d   t o : 
 
 1 )   k e e p   i t   f r o m   m a k i n g   p o i n t e r s   o u t   o f   t h e   o f f s e t s   i n   m a p   t h i n g y 
 
 2 )   u s e   t h e   o f f s e t s   a n d   a d d   t o   a   b a s e   p o i n t e r 
 
 
 
 8 0 3 B 8 B 4 0 : 	 C - 7 2 5 5 8 0 + D 7 0 	 c r e a t e   p o i n t e r s   f r o m   o f f s e t s 
 
 A D D I U 	 S P , S P , F F D 8 
 
 S W 	 R A , 0 0 2 4   ( S P ) 
 
 S W 	 S 2 , 0 0 2 0   ( S P ) 
 
 S W 	 S 1 , 0 0 1 C   ( S P ) 
 
 S W 	 S 0 , 0 0 1 8   ( S P ) 
 
 / / 8 0 3 B 8 B 5 4 : 
 
 L W 	 T 6 , 0 0 2 8   ( A 0 ) 
 
 L U I 	 A T , 8 0 0 0 
 
 L U I 	 S 0 , 8 0 3 C 
 
 A D D U 	 T 7 , T 6 , A T 
 
 L U I 	 A T , 8 0 1 4 
 
 S W 	 T 7 , 5 8 D 0   ( A T ) 
 
 A D D I U 	 S 0 , S 0 , A 0 E 8 	 ; S 0 = 8 0 3 B A 0 E 8 :   s t a r t   o f   6   o f f s e t s   t o   i m a g e s 
 
 O R 	 S 1 , R 0 , R 0 	 ; S 1 = c o u n t 
 
 A D D I U 	 S 2 , R 0 , 0 0 0 6 	 ; S 2 = # o f f s e t s 
 
 / / 8 0 3 B 8 B 7 8 : 
 
 J A L 	 8 0 0 9 A D A 8 
 
 L W 	 A 0 , 0 0 0 0   ( S 0 ) 	 ; A 0 = o f f s e t 
 
 A D D I U 	 S 1 , S 1 , 0 0 0 1 	 ; c o u n t + + 
 
 A D D I U 	 S 0 , S 0 , 0 0 0 4 	 ; a d d y + = 4 
 
 B N E 	 S 1 , S 2 , 8 0 3 B 8 B 7 8 
 
 S W 	 V 0 , F F F C   ( S 0 ) 
 
 / / 8 0 3 B 8 B 9 0 : 
 
 L U I 	 A 0 , 0 C 0 0 
 
 J A L 	 8 0 0 9 A D A 8 
 
 A D D I U 	 A 0 , A 0 , 7 3 B 8 	 ; A 0 = 0 C 0 0 7 3 B 8 
 
 L U I 	 A T , 8 0 3 C 
 
 L U I 	 A 0 , 0 C 0 0 
 
 S W 	 V 0 , E 2 5 8   ( A T ) 	 ; c o n v e r t e d - > 8 0 3 B E 2 5 8 :   
 
 J A L 	 8 0 0 9 A D A 8 
 
 A D D I U 	 A 0 , A 0 , 1 5 1 0 	 ; A 0 = 0 C 0 0 1 5 1 0 
 
 L U I 	 A T , 8 0 3 C 
 
 L U I 	 A 0 , 0 C 0 0 
 
 S W 	 V 0 , E 2 5 4   ( A T ) 
 
 J A L 	 8 0 0 9 A D A 8 
 
 A D D I U 	 A 0 , A 0 , 1 5 C 0 
 
 L U I 	 A T , 8 0 3 C 
 
 L U I 	 A 0 , 0 C 0 0 
 
 S W 	 V 0 , E 2 5 0   ( A T ) 
 
 J A L 	 8 0 0 9 A D A 8 
 
 A D D I U 	 A 0 , A 0 , 1 6 2 0 
 
 L U I 	 A T , 8 0 3 C 
 
 L U I 	 A 0 , 0 C 0 0 
 
 S W 	 V 0 , E 2 4 C   ( A T ) 
 
 J A L 	 8 0 0 9 A D A 8 
 
 A D D I U 	 A 0 , A 0 , 1 6 8 0 
 
 L U I 	 A T , 8 0 3 C 
 
 L U I 	 A 0 , 0 C 0 0 
 
 S W 	 V 0 , E 2 4 8   ( A T ) 
 
 J A L 	 8 0 0 9 A D A 8 
 
 A D D I U 	 A 0 , A 0 , 7 A 4 0 
 
 L U I 	 A T , 8 0 3 C 
 
 L U I 	 A 0 , 0 C 0 0 
 
 S W 	 V 0 , E 2 5 C   ( A T ) 
 
 J A L 	 8 0 0 9 A D A 8 
 
 A D D I U 	 A 0 , A 0 , 7 A D 0 
 
 / / 8 0 3 B 8 C 1 4 : 
 
 L U I 	 A T , 8 0 3 C 
 
 S W 	 V 0 , E 2 6 0   ( A T ) 
 
 L W 	 R A , 0 0 2 4   ( S P ) 
 
 L W 	 S 0 , 0 0 1 8   ( S P ) 
 
 L W 	 S 1 , 0 0 1 C   ( S P ) 
 
 L W 	 S 2 , 0 0 2 0   ( S P ) 
 
 J R 	 R A 
 
 A D D I U 	 S P , S P , 0 0 2 8 
 
 
 
 8 0 0 9 A D A 8 : 	 0 x 	 c o n v e r t   0 X -   o f f s e t   t y p e   t o   a   r d r a m   a d d r e s s 
 
 	 a c c e p t s :   A 0 = 0 X - o f f s e t 
 
 	 r e t u r n s :   V 0 = r d r a m   a d d r e s s 
 
 	 f r i e s :   A T , T 0 , T 6 , T 7 , T 8 , T 9 
 
 S L L 	 T 6 , A 0 , 0 x 4 
 
 S R L 	 T 7 , T 6 , 0 x 1 C 	 ; T 7 = o f f s e t   t y p e 	 t h e   X ,   i n   o t h e r   w o r d s 
 
 S L L 	 T 8 , T 7 , 0 x 2 	 ; T 8 = t y p e - > o f f s e t 
 
 L U I 	 T 9 , 8 0 1 4 
 
 A D D U 	 T 9 , T 9 , T 8 
 
 L U I 	 A T , 0 0 F F 
 
 L W 	 T 9 , 5 8 A 0   ( T 9 ) 	 ; T 9 = 8 0 1 4 5 8 A 0 + o f f :   t a b l e   o f   o f f s e t - > p o i n t e r   c o n v e r s i o n s 
 
 O R I 	 A T , A T , F F F F 	 ; A T = 0 0 F F F F F F :   a d d r e s s   m a s k 
 
 A N D 	 T 0 , A 0 , A T 	 ; T 0 = a d d r e s s   o f f s e t 
 
 L U I 	 A T , 8 0 0 0 
 
 A D D U 	 V 0 , T 9 , T 0 	 ; V 0 = a d d r e s s   o f f s e t   +   p o i n t e r   c o n v e r s i o n 
 
 A D D U 	 V 0 , V 0 , A T 	 ; V 0 = r d r a m   a d d r e s s 
 
 J R 	 R A 
 
 N O P 
 
 
 
 T h e   c h a r a c t e r s   f o r   t h e   c u r r e n t   p o s i t i o n   a r e   d r a w n   u s i n g   8 0 3 B 9 6 9 C : 
 
 / / 8 0 3 B 9 6 B 0 : 	 + 1 8 E 0 	 c o l u m n s 
 
 L U I 	 A 0 , 8 0 3 C 
 
 A D D I U 	 A 0 , A 0 , A 0 E 8 	 ; A 0 = 8 0 3 B A 0 E 8 :   b a s e   f o r   p o i n t e r   l o o k u p 
 
 L W 	 V 1 , 0 2 9 8   ( T 6 ) 
 
 L U I 	 T 7 , D B 0 6 
 
 O R I 	 T 7 , T 7 , 0 0 2 0 
 
 O R 	 V 0 , V 1 , R 0 
 
 S W 	 T 7 , 0 0 0 0   ( V 0 ) 
 
 L B U 	 T 8 , 0 0 0 0   ( A 1 ) 	 ; ' n u m b e r '   t o   a p p e a r 
 
 L U I 	 T 2 , D B 0 6 
 
 A D D I U 	 V 1 , V 1 , 0 0 0 8 
 
 S L L 	 T 9 , T 8 , 0 x 2 	 ; T 9 = # - > o f f s e t 
 
 A D D U 	 T 0 , A 0 , T 9 	 ; T 0 = p - > i m a g e   D L 
 
 L W 	 T 1 , 0 0 0 0   ( T 0 ) 	 ; T 1 = i m a g e   D L   p o i n t e r 
 
 / / 8 0 3 B 9 6 E 4 : 	 + 1 9 1 4 	 r o w s 
 
 O R I 	 T 2 , T 2 , 0 0 2 4 
 
 A D D I U 	 A T , R 0 , 0 0 0 4 
 
 S W 	 T 1 , 0 0 0 4   ( V 0 ) 
 
 L B U 	 T 3 , 0 0 0 1   ( A 1 ) 	 ; ' l e t t e r '   t o   a p p e a r 
 
 A D D I U 	 V 1 , V 1 , 0 0 0 8 
 
 S L L 	 T 4 , T 3 , 0 x 2 	 ; T 4 = # - > o f f s e t 
 
 A D D U 	 T 5 , A 0 , T 4 	 ; T 5 = p - > i m a g e   D L 
 
 L W 	 T 6 , 0 0 0 0   ( T 5 ) 	 ; T 6 = i m a g e   D L   p o i n t e r 
 
 S W 	 T 6 , 0 0 0 4   ( V 0 ) 
 
 
 
 m a k e   a   n e w   o f f s e t   t a b l e   f o r   c o l u m n s   a t   8 0 3 B A 2 2 C : 
 
 0 C 0 0 A 9 6 0 	 1 
 
 0 C 0 0 B 0 6 0 	 2 
 
 0 C 0 0 B 1 6 0 	 3 
 
 0 C 0 0 B 6 6 0 	 4 
 
 0 C 0 0 B 7 6 0 	 5 
 
 h e c k ,   t a c k   t h e   o l d   g u y s   o n   t h e   e n d   o f   i t   s o   t h e   c o n v e r t e r   d o e s n ' t   w o r k   a s   h a r d 
 
 
 
 / / 8 0 3 B 9 6 B 0 : 	 + 1 8 E 0 	 c o l u m n s 	 r e v i s i o n 
 
 L U I 	 A 0 , 8 0 3 C 
 
 A D D I U 	 A 0 , A 0 , A 2 2 C 	 ; A 0 = 8 0 3 B A 0 E 8 :   b a s e   f o r   p o i n t e r   l o o k u p 
 
 / / 8 0 3 B 9 7 0 8 : 	 + 1 9 3 8 	 r o w s 
 
 L W 	 T 6 , 0 0 1 4   ( T 5 ) 	 ; T 6 = i m a g e   D L   p o i n t e r 
 
 
 
 
 
 
 
 / / 8 0 3 B 8 B 5 4 : 	 + D 8 4 	 R E V I S I O N 
 
 	 L W 	 T 6 , 0 0 2 8   ( A 0 ) 
 
 	 L U I 	 A T , 8 0 0 0 
 
 	 L U I 	 S 0 , 8 0 3 C 
 
 	 A D D U 	 T 7 , T 6 , A T 
 
 	 L U I 	 A T , 8 0 1 4 
 
 	 S W 	 T 7 , 5 8 D 0   ( A T ) 
 
 	 * A D D I U 	 S 0 , S 0 , A 2 2 C 	 ; S 0 = 8 0 3 B A 2 2 C :   s t a r t   o f   i m a g e s 
 
 	 O R 	 S 1 , R 0 , R 0 	 ; S 1 = c o u n t 
 
 	 * A D D I U 	 S 2 , R 0 , 0 0 0 B 	 ; S 2 = # o f f s e t s 
 
 
 
 h e r e ' s   a   f u n   w a y   t o   c l e a r   o u t   s o m e   s p a c e   ; * ) 
 
 8 0 3 B A 2 1 8 - A 2 6 0   a r e   u s e d   h e r e : 
 
 / / 8 0 3 B 9 2 B 4 : 	 + 1 4 E 4 
 
 L W 	 T 9 , 0 0 1 C   ( S P ) 
 
 L U I 	 T 0 , 8 0 3 C 
 
 L U I 	 A T , F F 0 0 
 
 A D D U 	 T 0 , T 0 , T 9 
 
 L W 	 T 0 , A 2 1 8   ( T 0 ) 
 
 R E V I S E D ! ! ! 
 
 8 F B 9 0 0 3 C 	 * L W 	 T 9 , 0 0 3 C   ( S P ) 
 
 	 L U I 	 T 0 , 8 0 3 C 
 
 	 L U I 	 A T , F F 0 0 
 
 	 A D D U 	 T 0 , T 0 , T 9 
 
 9 1 0 8 A 2 1 8 	 * L B U 	 T 0 , A 2 1 8   ( T 0 ) 
 
 
 
 @ _ @ 
 
 
 
 c a t a l o g   d i a l o g : 
 
 " U n a v a i l a b l e "   s t r i n g   m o v e d   a n d   e x t e n d e d 
 
 C - 7 2 F 5 D 0   +   0 x 2 1 6 8 
 
 2 4 0 6 0 0 0 5 	 - > 	 2 4 0 6 0 0 0 8   
 
 1 5 C 0 0 0 0 C 
 
 4 6 0 0 0 0 8 6 
 
 3 C 0 5 8 0 8 B 
 
 2 4 A 5 F 9 6 4 	 - > 	 2 4 A 5 F 9 B 4   
 
 2 7 A 4 0 0 5 0 
 
 2 4 0 6 0 0 0 5 	 - > 	 2 4 0 6 0 0 0 8   
 
 0 C 0 2 6 6 3 0 
 
 E 7 A 0 0 0 4 4 
 
 
 
 & _ & 
 
 
 
 W r i t t i n g   a   l e t t e r   d i a l o g : 	 c r o s s   r e f e r e n c e   w i t h   c u r s o r   p o s i t i o n s   d A S M 
 
 8 0 3 C C 9 6 8 	 
 
 	 	 1 E E E 1 9 0 0 1 2 1 4 C 2 9 7 B 2 1 2 1 7 2 1 
 
 	 	 9 1 D C B A 9 D 1 0 C B 0 2 E 7 9 6 B 7 F 4 0 C 
 
 	 	 
 
 8 0 3 C C 9 8 0 	 c o l o r   v a l u e s   x 1 1 
 
 8 0 3 C C 9 A C 	 r e s o u r c e   f i l e   c a l l 	 0 0 A 7 B 0 0 0   0 0 A 7 B 7 E 0 
 
 
 
 8 0 3 C C A 5 6   s t a r t s   t h e   a d d r e s s   l i s t : 
 
 0 x 0 	 6 	 r e c i p i e n t   n a m e 
 
 0 x 6 	 6 	 t o w n   n a m e 
 
 0 x C 	 1 	 ? ? 
 
 0 x D 	 1 	 s a m e   a s   0 x C 
 
 0 x E 	 2 	 3 0 F 9 
 
 0 x 1 0 	 1 	 0 1 
 
 0 x 1 1 	 1 	 0 0 
 
 
 
 8 0 0 9 9 8 C 0 ,   c a l l e d   t h r o u g h   8 0 0 B 7 7 A 4 ,   u s e d   t o   c o p y   n a m e   t o   b u f f e r   ( s e t s   s i z e   t o   6 ) 
 
 B o t h   c a l l e d   b y   8 0 0 9 C 7 0 C ,   w h i c h   g e t s   n a m e   l i s t 
 
 8 0 3 C B 3 3 0   i s   t h e   c o n s t r u c t o r ! 
 
 A D D I U 	 S P , S P , F F C 8 
 
 S W 	 S 7 , 0 0 3 0   ( S P ) 
 
 O R 	 S 7 , A 0 , R 0 
 
 S W 	 R A , 0 0 3 4   ( S P ) 
 
 S W 	 S 6 , 0 0 2 C   ( S P ) 
 
 S W 	 S 5 , 0 0 2 8   ( S P ) 
 
 S W 	 S 4 , 0 0 2 4   ( S P ) 
 
 S W 	 S 3 , 0 0 2 0   ( S P ) 
 
 S W 	 S 2 , 0 0 1 C   ( S P ) 
 
 S W 	 S 1 , 0 0 1 8   ( S P ) 
 
 S W 	 S 0 , 0 0 1 4   ( S P ) 
 
 / / 8 0 3 C B 3 5 C : 
 
 L U I 	 S 0 , 8 0 1 3 
 
 L U I 	 S 4 , 8 0 1 3 
 
 A D D I U 	 S 0 , S 0 , 0 D B 8 	 ; S 0 = 8 0 1 3 0 D B 8 :   
 
 A D D I U 	 S 1 , S 7 , 0 0 8 6 	 ; S 1 = t a r g e t   f o r   t h e   r e c i p i e n t   e n t r i e s 
 
 L W 	 S 4 , 6 F D 8   ( S 4 ) 	 ; S 4 = 8 0 1 3 6 F D 8 :   p - > p - > p l a y e r + t o w n   n a m e 
 
 O R 	 S 3 , R 0 , R 0 	 ; S 3 = l i s t c o u n t 
 
 O R 	 S 2 , R 0 , R 0 	 ; S 2 = c o u n t 
 
 A D D I U 	 S 6 , R 0 , 0 0 0 F 	 ; S 6 = F ,   m a x   n u m b e r   o f   v i l l a g e r s 
 
 A D D I U 	 S 5 , R 0 , F F F F 	 ; S 5 = - 1 ,   f o r   t e s t   l a t e r 
 
 / / 8 0 3 C B 3 8 0 : 
 
 J A L 	 8 0 0 A 6 9 C 8 	 ; V 0 = T R U E   i f   s h o r t   a t   A 0   i s n ' t   a n   a c t o r   I D 
 
 O R 	 A 0 , S 0 , R 0 
 
 	 L H U 	 V 0 , 0 0 0 0   ( A 0 ) 
 
 	 O R 	 V 1 , R 0 , R 0 
 
 	 B N E Z 	 V 0 , 8 0 0 A 6 9 E 4 
 
 	 A N D I 	 T 7 , V 0 , F 0 0 0 
 
 	 L B U 	 T 6 , 0 0 0 A   ( A 0 ) 
 
 	 A D D I U 	 A T , R 0 , 0 0 F F 
 
 	 B E Q 	 T 6 , A T , 8 0 0 A 6 9 F 4 
 
 / / 8 0 0 A 6 9 E 4 : 
 
 	 S R A 	 T 8 , T 7 , 0 x C 
 
 	 A D D I U 	 A T , R 0 , 0 0 0 E 
 
 	 B E Q L 	 T 8 , A T , 8 0 0 A 6 9 F C 
 
 	 O R 	 V 0 , V 1 , R 0 
 
 / / 8 0 0 A 6 9 F 4 : 
 
 	 A D D I U 	 V 1 , R 0 , 0 0 0 1 
 
 	 O R 	 V 0 , V 1 , R 0 
 
 	 J R 	 R A 
 
 	 N O P 
 
 B N E Z 	 V 0 , 8 0 3 C B 3 B 4 
 
 O R 	 A 0 , S 4 , R 0 
 
 A D D I U 	 A 1 , S 0 , 0 0 1 0 
 
 J A L 	 8 0 0 A 7 2 3 8 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 7 
 
 / / 8 0 3 C B 3 9 C : 
 
 B E Q 	 V 0 , S 5 , 8 0 3 C B 3 B 4 	 ; s k i p   i f   V 0 = - 1 
 
 O R 	 A 0 , S 1 , R 0 	 ; A 0 = p - > n e w   e n t r y 
 
 J A L 	 8 0 0 9 C 7 0 C 	 ; m a k e   a n   e n t r y 
 
 O R 	 A 1 , S 0 , R 0 	 ; A 1 = p - > s o u r c e   f o r   n a m e s 
 
 A D D I U 	 S 1 , S 1 , 0 0 1 2 	 ; S 1 + = 0 x 1 2 :   n e x t   e n t r y 
 
 A D D I U 	 S 3 , S 3 , 0 0 0 1 	 ; l i s t c o u n t + + 
 
 / / 8 0 3 C B 3 B 4 : 
 
 A D D I U 	 S 2 , S 2 , 0 0 0 1 	 ; c o u n t + + 
 
 B N E 	 S 2 , S 6 , 8 0 3 C B 3 8 0 	 ; l o o p   u n t i l   a l l   t h e   p o s s i b l e   t o w n f o l k   s l o t s   h a v e   b e e n   t e s t e d 
 
 A D D I U 	 S 0 , S 0 , 0 5 2 8 	 ; n e x t   t o w n f o l k   t h i n g i e ? 
 
 / / 8 0 3 C B 3 C 0 : 
 
 S L T I 	 A T , S 3 , 0 0 0 8 
 
 B E Q 	 A T , R 0 , 8 0 3 C B 3 D 8 	 ; i f   l i s t c o u n t > 8 ,   b r a n c h 
 
 A D D I U 	 T 6 , R 0 , 0 0 0 8 	 	 ; T 6 = f o r c e   p a g e   1   e n t r y   #   t o   8 
 
 S B 	 S 3 , 0 0 0 8   ( S 7 ) 	 ; s t o w   c o u n t   a w a y 
 
 B E Q 	 R 0 , R 0 , 8 0 3 C B 3 E 4 
 
 S B 	 R 0 , 0 0 0 9   ( S 7 ) 	 ; 0   o n   p a g e   t w o 
 
 / / 8 0 3 C B 3 D 8 : 
 
 A D D I U 	 T 7 , S 3 , F F F 8 	 ; T 7 = #   t o   a p p e a r   o n   p a g e   2 
 
 S B 	 T 6 , 0 0 0 8   ( S 7 ) 	 ; 8   o n   p a g e   o n e 
 
 S B 	 T 7 , 0 0 0 9   ( S 7 ) 	 ; r e s t   o n   p a g e   2 
 
 / / 8 0 3 C B 3 E 4 : 	 w r a p   i t   u p   S a n t a .     w r a p     i t     u p 
 
 L W 	 R A , 0 0 3 4   ( S P ) 
 
 L W 	 S 0 , 0 0 1 4   ( S P ) 
 
 L W 	 S 1 , 0 0 1 8   ( S P ) 
 
 L W 	 S 2 , 0 0 1 C   ( S P ) 
 
 L W 	 S 3 , 0 0 2 0   ( S P ) 
 
 L W 	 S 4 , 0 0 2 4   ( S P ) 
 
 L W 	 S 5 , 0 0 2 8   ( S P ) 
 
 L W 	 S 6 , 0 0 2 C   ( S P ) 
 
 L W 	 S 7 , 0 0 3 0   ( S P ) 
 
 J R 	 R A 
 
 A D D I U 	 S P , S P , 0 0 3 8 
 
 
 
 
 
 8 0 0 9 C 7 0 C : 	 0 x 	 G e t   n a m e   l i s t   o f   a c t o r s 
 
 A D D I U 	 S P , S P , F F D 8 
 
 S W 	 S 1 , 0 0 1 8   ( S P ) 
 
 S W 	 S 0 , 0 0 1 4   ( S P ) 
 
 O R 	 S 0 , A 0 , R 0 	 ; S 0 = b u f f e r   t a r g e t   [ 8 0 3 C C A 5 6 ] 
 
 O R 	 S 1 , A 1 , R 0 	 ; s t r i n g   s o u r c e   a d d r e s s   ( f r o m   S R A M ? ) 
 
 S W 	 R A , 0 0 1 C   ( S P ) 
 
 A D D I U 	 T 6 , R 0 , 0 0 0 1 
 
 S B 	 T 6 , 0 0 1 0   ( S 0 ) 	 ; 1 - > 0 x 1 0   s l o t 
 
 A D D I U 	 A 0 , S P , 0 0 2 0 
 
 J A L 	 8 0 0 A C D 1 8 	 ; r e t r i e v e   a c t o r ' s   n a m e 
 
 O R 	 A 1 , S 1 , R 0 
 
 / / 8 0 0 9 C 7 3 8 : 
 
 O R 	 A 0 , S 0 , R 0 	 ; A 0 = p - > t a r g e t 
 
 J A L 	 8 0 0 B 7 7 A 4 	 ; c o p y   6 - b y t e   s t r i n g   t o   t a r g e t 
 
 A D D I U 	 A 1 , S P , 0 0 2 0 	 ; A 1 = p - > s o u r c e 
 
 / / 8 0 0 9 C 7 4 4 : 
 
 L H U 	 T 7 , 0 0 0 2   ( S 1 ) 	 ; T 7 = 3 0 F 9 	 S 1 = [ 8 0 1 3 0 D B 8 ] 
 
 A D D I U 	 A 0 , S 0 , 0 0 0 6 	 ; A 0 = o f f s e t   t o   t o w n   n a m e 
 
 A D D I U 	 A 1 , S 1 , 0 0 0 4 	 ; A 1 = p - > t o w n   n a m e 
 
 J A L 	 8 0 0 9 4 F 0 4 	 ; c o p y   t o w n   n a m e 
 
 S H 	 T 7 , 0 0 0 E   ( S 0 ) 	 ; T 7 - > 0 x E   s l o t 
 
 / / 8 0 0 9 C 7 5 8 
 
 L H U 	 T 9 , 0 0 0 0   ( S 1 ) 	 ; T 9 = ? 	 [ E 0 4 6 ] 
 
 L B U 	 T 2 , 0 0 0 A   ( S 1 ) 	 ; T 2 = ? 	 [ 4 6 ] 
 
 S L L 	 T 0 , T 9 , 0 x 8 	 ; T 0 = T 9 * 1 0 0 	 [ 4 6 0 0 ] 
 
 O R 	 T 3 , T 0 , T 2 	 ; T 3 = [ 4 6 4 6 ] 
 
 S H 	 T 3 , 0 0 0 C   ( S 0 ) 	 ; s a v e   t o   0 x C   s l o t 
 
 L W 	 R A , 0 0 1 C   ( S P ) 
 
 L W 	 S 0 , 0 0 1 4   ( S P ) 
 
 L W 	 S 1 , 0 0 1 8   ( S P ) 
 
 J R 	 R A 
 
 A D D I U 	 S P , S P , 0 0 2 8 
 
 
 
 8 0 0 9 4 F 0 4 	 0 x 	 R e d i r e c t   t o   8 0 0 9 9 8 C 0 ,   f o r c i n g   s t r i n g   s i z e = 6 
 
 	 a c c e p t s :   A 0 = p - > t a r g e t ,   A 1 = p - > s o u r c e ,   A 2   s e t   t o   6 
 
 A D D I U 	 S P , S P , F F E 8 
 
 S W 	 R A , 0 0 1 4   ( S P ) 
 
 J A L 	 8 0 0 9 9 8 C 0 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 6 
 
 L W 	 R A , 0 0 1 4   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 1 8 
 
 J R 	 R A 
 
 N O P 
 
 
 
 8 0 0 A C D 1 8 	 0 x 	 p r o b a b l y   f i g u r e s   o u t   w h a t   n p c   n a m e   s h o u l d   b e   h e r e   a n d   l o a d s   t h e m 
 
 A D D I U 	 S P , S P , F F D 8 
 
 S W 	 R A , 0 0 1 4   ( S P ) 
 
 S W 	 A 0 , 0 0 2 8   ( S P ) 
 
 O R 	 A 3 , A 1 , R 0 
 
 L U I 	 A 2 , 8 0 1 1 
 
 B E Q 	 A 3 , R 0 , 8 0 0 A C D 5 8 
 
 A D D I U 	 A 2 , A 2 , B 8 1 0 	 ; A 2 = 8 0 1 0 B 8 1 0 :   
 
 L H U 	 A 1 , 0 0 0 0   ( A 3 ) 
 
 A D D I U 	 A T , R 0 , 0 0 0 E 
 
 A N D I 	 T 6 , A 1 , F 0 0 0 
 
 S R A 	 T 7 , T 6 , 0 x C 
 
 B N E L 	 T 7 , A T , 8 0 0 A C D 5 C 
 
 L W 	 A 0 , 0 0 2 8   ( S P ) 
 
 J A L 	 8 0 0 A C C A C 	 ; r e t r i e v e   a c t o r ' s   n a m e 
 
 A D D I U 	 A 0 , S P , 0 0 1 C 
 
 A D D I U 	 A 1 , S P , 0 0 1 C 
 
 / / 8 0 0 A C D 5 8 : 
 
 L W 	 A 0 , 0 0 2 8   ( S P ) 
 
 J A L 	 8 0 0 9 9 8 C 0 	 ; c o p y   s t r i n g   t o   t a r g e t 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 8 	 ; s i z e   i s   8 
 
 L W 	 R A , 0 0 1 4   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 2 8 
 
 J R 	 R A 
 
 N O P 
 
 
 
 
 
 8 0 3 C B D D 4 	 T h i s   b u g g e r   w r i t e s   t h e   n a m e s   o n - s c r e e n . 
 
 i n   p a r t i c u l a r . . . 
 
 / / 8 0 3 C B F 1 4 : 
 
 A D D I U 	 A T , R 0 , 0 0 0 1 
 
 B N E 	 S 6 , A T , 8 0 3 C B F 5 C 
 
 L W 	 A 0 , 0 0 9 4   ( S P ) 
 
 L B U 	 T 0 , 0 0 0 5   ( S 3 ) 
 
 B N E 	 S 1 , T 0 , 8 0 3 C B F 5 C 
 
 N O P 
 
 B N E Z 	 S 5 , 8 0 3 C B F 5 4 
 
 O R 	 V 0 , S 8 , R 0 
 
 L B U 	 T 1 , 0 0 0 6   ( S 3 ) 
 
 A D D I U 	 S 0 , S 1 , 0 0 0 1 
 
 B E Q 	 T 1 , R 0 , 8 0 3 C B F 5 4 
 
 N O P 
 
 B N E 	 S 2 , S 0 , 8 0 3 C B F 5 4 
 
 N O P 
 
 B E Q 	 R 0 , R 0 , 8 0 3 C B F 9 C 
 
 O R 	 V 0 , S 7 , R 0 
 
 / / 8 0 3 C B F 5 4 : 
 
 B E Q 	 R 0 , R 0 , 8 0 3 C B F 9 C 
 
 A D D I U 	 S 0 , S 1 , 0 0 0 1 
 
 / / 8 0 3 C B F 5 C : 
 
 B N E Z 	 S 5 , 8 0 3 C B F 9 4 
 
 L U I 	 V 1 , 8 0 3 D 
 
 L B U 	 T 2 , 0 0 0 6   ( S 3 ) 
 
 L U I 	 V 0 , 8 0 3 D 
 
 A D D I U 	 S 0 , S 1 , 0 0 0 1 
 
 B E Q 	 T 2 , R 0 , 8 0 3 C B F 8 C 
 
 A D D I U 	 V 0 , V 0 , C 9 9 8 	 ; V 0 = 8 0 3 C C 9 9 8 
 
 B N E 	 S 2 , S 0 , 8 0 3 C B F 8 C 
 
 N O P 
 
 L U I 	 V 0 , 8 0 3 D 
 
 B E Q 	 R 0 , R 0 , 8 0 3 C B F 9 C 
 
 A D D I U 	 V 0 , V 0 , C 9 A 0 
 
 / / 8 0 3 C B F 8 C : 
 
 B E Q 	 R 0 , R 0 , 8 0 3 C B F 9 C 
 
 A D D I U 	 S 0 , S 1 , 0 0 0 1 
 
 / / 8 0 3 C B F 9 4 : 
 
 A D D I U 	 V 0 , V 0 , C 9 9 C 
 
 A D D I U 	 S 0 , S 1 , 0 0 0 1 
 
 / / 8 0 3 C B F 9 C : 
 
 S W C 1 	 F 2 0 , 0 0 1 0   ( S P ) 
 
 L B U 	 T 3 , 0 0 0 0   ( V 0 ) 
 
 M F C 1 	 A 3 , F 2 8 
 
 A D D I U 	 T 6 , R 0 , 0 0 F F 
 
 S W 	 T 3 , 0 0 1 4   ( S P ) 
 
 L B U 	 T 4 , 0 0 0 1   ( V 0 ) 
 
 O R 	 A 1 , S 4 , R 0 	 ; A 1 = t e x t   t o   w r i t e 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 6 	 ; l e n g t h   o f   n a m e   s t r i n g 
 
 S W 	 T 5 , 0 0 1 8   ( S P ) 
 
 L B U 	 T 5 , 0 0 0 2   ( V 0 ) 
 
 S W 	 R 0 , 0 0 3 4   ( S P ) 
 
 S W C 1 	 F 2 2 , 0 0 3 0   ( S P ) 
 
 S W C 1 	 F 2 2 , 0 0 2 C   ( S P ) 
 
 S W 	 R 0 , 0 0 2 8   ( S P ) 
 
 S W 	 R 0 , 0 0 2 4   ( S P ) 
 
 S W 	 T 6 , 0 0 2 0   ( S P ) 
 
 J A L 	 8 0 0 9 0 E 9 8 	 ; t e x t   w r i t t i n g   r o u t i n e 
 
 S W 	 T 5 , 0 0 1 C   ( S P ) 
 
 / / 8 0 3 C B F E 4 : 
 
 L B U 	 T 7 , 0 0 0 6   ( S 3 ) 
 
 A D D I U 	 S 4 , S 4 , 0 0 1 2 	 ; n e x t   e n t r y 
 
 A D D I U 	 T 8 , S 1 , 0 0 0 2 
 
 B E Q L 	 T 7 , R 0 , 8 0 3 C C 0 1 4 
 
 A D D . S 	 F 2 0 , F 2 0 , F 2 6 
 
 B N E L 	 S 2 , T 8 , 8 0 3 C C 0 1 4 
 
 A D D . S 	 F 2 0 , F 2 0 , F 2 6 
 
 B N E L 	 S 5 , R 0 , 8 0 3 C C 0 1 4 
 
 A D D . S 	 F 2 0 , F 2 0 , F 2 6 
 
 B E Q 	 R 0 , R 0 , 8 0 3 C C 0 1 4 
 
 A D D . S 	 F 2 0 , F 2 0 , F 2 4 
 
 A D D . S 	 F 2 0 , F 2 0 , F 2 6 
 
 / / 8 0 3 C C 0 1 4 : 
 
 B N E 	 S 0 , S 2 , 8 0 3 C B F 1 4 
 
 O R 	 S 1 , S 0 , R 0 
 
 / / 8 0 3 C C 0 1 C : 
 
 L W 	 R A , 0 0 8 C   ( S P ) 
 
 L D C 1 	 F 2 0 , 0 0 4 0   ( S P ) 
 
 L D C 1 	 F 2 2 , 0 0 4 8   ( S P ) 
 
 L D C 1 	 F 2 4 , 0 0 5 0   ( S P ) 
 
 L D C 1 	 F 2 6 , 0 0 5 8   ( S P ) 
 
 L D C 1 	 F 2 8 , 0 0 6 0   ( S P ) 
 
 L W 	 S 0 , 0 0 6 8   ( S P ) 
 
 L W 	 S 1 , 0 0 6 C   ( S P ) 
 
 L W 	 S 2 , 0 0 7 0   ( S P ) 
 
 L W 	 S 3 , 0 0 7 4   ( S P ) 
 
 L W 	 S 4 , 0 0 7 8   ( S P ) 
 
 L W 	 S 5 , 0 0 7 C   ( S P ) 
 
 L W 	 S 6 , 0 0 8 0   ( S P ) 
 
 L W 	 S 7 , 0 0 8 4   ( S P ) 
 
 L W 	 S 8 , 0 0 8 8   ( S P ) 
 
 J R 	 R A 
 
 A D D I U 	 S P , S P , 0 0 9 0 
 
 
 
 8 0 3 C B 4 C 4 	 t h i s   r o u t i n e   c o p i e s   t h e   n a m e   a s   t h e   s u p e r s c r i p t : 
 
 / / 8 0 3 C B 5 5 8 : 
 
 L B U 	 T 3 , 0 0 0 5   ( V 1 ) 
 
 S L L 	 T 4 , T 3 , 0 x 3 	 ; 8 # 
 
 A D D U 	 T 4 , T 4 , T 3 	 ; 8 # + 1 
 
 S L L 	 T 4 , T 4 , 0 x 1 	 ; 2 ( 8 # + 1 ) = # * 0 x 1 2 
 
 A D D U 	 A 3 , V 1 , T 4 	 ; A 3 = p - > n a m e   f o r   s u p e r s c r i p t 
 
 B E Q 	 R 0 , R 0 , 8 0 3 C B 5 B 0 
 
 A D D I U 	 A 3 , A 3 , 0 0 2 C 
 
 / / 8 0 3 C B 5 7 4 : 
 
 B N E L 	 V 0 , A T , 8 0 3 C B 5 9 C 
 
 L B U 	 T 8 , 0 0 0 5   ( V 1 ) 
 
 L B U 	 T 5 , 0 0 0 5   ( V 1 ) 
 
 S L L 	 T 7 , T 5 , 0 x 3 
 
 A D D U 	 T 7 , T 7 , T 5 
 
 S L L 	 T 7 , T 7 , 0 x 1 
 
 A D D U 	 A 3 , V 1 , T 7 
 
 B E Q 	 R 0 , R 0 , 8 0 3 C B 5 B 0 
 
 A D D I U 	 A 3 , A 3 , 0 1 1 6 
 
 / / 8 0 3 C B 5 9 8 : 
 
 L B U 	 T 8 , 0 0 0 5   ( V 1 ) 	 ; T 8 = l e n g t h   o f   s u p e r s c r i p t 
 
 S L L 	 T 6 , T 8 , 0 x 3 
 
 A D D U 	 T 6 , T 6 , T 8 
 
 S L L 	 T 6 , T 6 , 0 x 1 
 
 A D D U 	 A 3 , V 1 , T 6 
 
 A D D I U 	 A 3 , A 3 , 0 0 8 6 
 
 / / 8 0 3 C B 5 B 0 : 
 
 O R 	 A 1 , A 3 , R 0 
 
 S W 	 A 3 , 0 0 2 0   ( S P ) 
 
 J A L 	 8 0 0 9 C 4 3 8 
 
 S W 	 T 0 , 0 0 2 8   ( S P ) 
 
 / / 8 0 3 C B 5 C 0 : 
 
 L W 	 A 0 , 0 0 2 0   ( S P ) 
 
 A D D I U 	 A 1 , R 0 , 0 0 0 6 	 ; A 1 = m a x   s t r l e n 
 
 J A L 	 8 0 0 9 C 1 C 0 	 ; r e t u r n s   V 0 = a c t u a l   s t r l e n 
 
 A D D I U 	 A 2 , R 0 , 0 0 2 0 
 
 / / 8 0 3 C B 5 D 0 : 
 
 
 
 
 
 
 
 R E V I S I O N S ! 	 t h i s   s h o u l d   g e t   8 - l e t t e r   n a m e s   w o r k i n g ! 
 
 / / 8 0 0 A C D 6 0 : 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 8 	 ; s i z e   i s   8 
 
 / / 8 0 3 C B 3 A C : 
 
 A D D I U 	 S 1 , S 1 , 0 0 1 4 	 ; S 1 + = 0 x 1 4 :   n e x t   e n t r y 
 
 / / 8 0 3 C B F B 8 : 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 8 	 ; l e n g t h   o f   n a m e   s t r i n g 
 
 / / 8 0 3 C B F E 8 : 
 
 A D D I U 	 S 4 , S 4 , 0 0 1 4 	 ; n e x t   e n t r y 
 
 / / 8 0 3 C B 5 5 C : 
 
 S L L 	 T 4 , T 3 , 0 x 2 	 ; 4 # 
 
 A D D U 	 T 4 , T 4 , T 3 	 ; 4 # + 1 
 
 S L L 	 T 4 , T 4 , 0 x 2 	 ; 4 ( 4 # + 1 ) = # * 0 x 1 4 
 
 
 
 o n e   m o r e : 
 
 / / 8 0 0 9 E D 5 8 : 
 
 A D D I U 	 A 1 , R 0 , 0 0 0 6 	 - > 	 0 0 0 8 
 
 
 
 
 
 H o l d   o f f   o n   t h i s   h a c k   u n t i l   e v e r y t h i n g   e l s e   t h a t   J A L s   t h i s   c a n   b e   d e a l t   w i t h 
 
 / / 8 0 0 9 C 7 2 8 : 
 
 S B 	 T 6 , 0 0 1 2   ( S 0 ) 	 ; 1 - > 0 x 1 2   s l o t 
 
 / / 8 0 0 9 C 7 4 8 : 
 
 A D D I U 	 A 0 , S 0 , 0 0 0 8 	 ; A 0 = o f f s e t   t o   t o w n   n a m e 
 
 / / 8 0 0 9 C 7 5 4 : 
 
 S H 	 T 7 , 0 0 1 0   ( S 0 ) 	 ; T 7 - > 0 x 1 0   s l o t 
 
 / / 8 0 0 9 C 7 6 8 
 
 S H 	 T 3 , 0 0 0 E   ( S 0 ) 	 ; s a v e   t o   0 x E   s l o t 
 
 
 
 k n o w n   J A L   t o   8 0 0 9 C 7 0 C : 
 
 8 0 0 A 8 3 D 4 
 
 8 0 0 A 9 0 9 C 
 
 8 0 0 A 9 4 4 0 
 
 8 0 0 B 9 D 8 0 
 
 8 0 0 B B 9 6 8 
 
 
 
 A e g h !     T h i s   i s   a   h u g e   o r d e a l ,   s o   b e n c h i n g   i t   f o r   n o w 
 
 
 
 = _ = 
 
 
 
 8 0 2 C 3 A F 4 	 C - 8 5 4 A 6 0 : 0 x C 7 4 	 t e x t - w r i t t i n g   r o u t i n e   f o r   " n o   c o n t r o l l e r "   w a r n i n g 
 
 A D D I U 	 S P , S P , F F B 0 
 
 S W 	 S 0 , 0 0 4 8   ( S P ) 
 
 O R 	 S 0 , A 0 , R 0 
 
 S W 	 R A , 0 0 4 C   ( S P ) 
 
 J A L 	 8 0 2 C 3 A 0 4 
 
 O R 	 A 0 , S 0 , R 0 
 
 L W 	 A 0 , 0 0 0 0   ( S 0 ) 
 
 J A L 	 8 0 0 9 0 F 1 0 
 
 A D D I U 	 A 1 , R 0 , 0 0 0 1 
 
 / / 8 0 2 C 3 B 1 8 : 
 
 L U I 	 A T , 3 F 8 0 	 	 ; z   s c a l e ;   i n   o t h e r   w o r d s ,   s i z e   ( 3 F 4 0   i s   s e n s i b l e ) 
 
 M T C 1 	 A T , F 0 
 
 L U I 	 A T , 4 2 F 0 	 	 ; y   p o s i t i o n 
 
 M T C 1 	 A T , F 4 
 
 L U I 	 A 1 , 8 0 2 C 
 
 A D D I U 	 T 6 , R 0 , 0 0 3 2 
 
 A D D I U 	 T 7 , R 0 , 0 0 1 E 
 
 A D D I U 	 T 8 , R 0 , 0 0 1 E 
 
 A D D I U 	 T 9 , R 0 , 0 0 F F 
 
 A D D I U 	 T 0 , R 0 , 0 0 0 1 
 
 A D D I U 	 T 1 , R 0 , 0 0 0 1 
 
 S W 	 T 1 , 0 0 3 8   ( S P ) 
 
 S W 	 T 0 , 0 0 2 8   ( S P ) 
 
 S W 	 T 9 , 0 0 2 0   ( S P ) 
 
 S W 	 T 8 , 0 0 1 C   ( S P ) 
 
 S W 	 T 7 , 0 0 1 8   ( S P ) 
 
 S W 	 T 6 , 0 0 1 4   ( S P ) 
 
 A D D I U 	 A 1 , A 1 , 5 3 2 8 	 ; A 1 = 8 0 2 C 5 3 2 8 :   f i r s t   l i n e   o f   t e x t 
 
 O R 	 A 0 , S 0 , R 0 
 
 A D D I U 	 A 2 , R 0 , 0 0 1 4 	 ; A 2 = s t r i n g   l e n g t h 
 
 L U I 	 A 3 , 4 2 5 C 	 	 ; x   p o s i t i o n 
 
 S W 	 R 0 , 0 0 2 4   ( S P ) 
 
 S W 	 R 0 , 0 0 2 C   ( S P ) 
 
 S W C 1 	 F 0 , 0 0 3 0   ( S P ) 
 
 S W C 1 	 F 0 , 0 0 3 4   ( S P ) 
 
 J A L 	 8 0 0 9 0 E 1 C 
 
 S W C 1 	 F 4 , 0 0 1 0   ( S P ) 
 
 / / 8 0 2 C 3 B 8 4 : 
 
 L U I 	 A T , 3 F 8 0 	 	 ; z   s c a l e ;   i n   o t h e r   w o r d s ,   s i z e   ( 3 F 4 0   i s   s e n s i b l e ) 
 
 M T C 1 	 A T , F 0 
 
 L U I 	 A T , 4 3 0 C 	 	 ; y   p o s i t i o n 
 
 M T C 1 	 A T , F 6 
 
 L U I 	 A 1 , 8 0 2 C 
 
 A D D I U 	 T 2 , R 0 , 0 0 3 2 
 
 A D D I U 	 T 3 , R 0 , 0 0 1 E 
 
 A D D I U 	 T 4 , R 0 , 0 0 1 E 
 
 A D D I U 	 T 5 , R 0 , 0 0 F F 
 
 A D D I U 	 T 6 , R 0 , 0 0 0 1 
 
 A D D I U 	 T 7 , R 0 , 0 0 0 1 
 
 S W 	 T 7 , 0 0 3 8   ( S P ) 
 
 S W 	 T 6 , 0 0 2 8   ( S P ) 
 
 S W 	 T 5 , 0 0 2 0   ( S P ) 
 
 S W 	 T 4 , 0 0 1 C   ( S P ) 
 
 S W 	 T 3 , 0 0 1 8   ( S P ) 
 
 S W 	 T 2 , 0 0 1 4   ( S P ) 
 
 A D D I U 	 A 1 , A 1 , 5 3 3 C 	 ; A 1 = 8 0 2 C 5 3 3 C :   s e c o n d   l i n e   o f   t e x t 
 
 O R 	 A 0 , S 0 , R 0 
 
 A D D I U 	 A 2 , R 0 , 0 0 1 4 	 ; A 2 = s t r i n g   l e n g t h 
 
 L U I 	 A 3 , 4 2 8 0 	 	 ; x   p o s i t i o n 
 
 S W 	 R 0 , 0 0 2 4   ( S P ) 
 
 S W 	 R 0 , 0 0 2 C   ( S P ) 
 
 S W C 1 	 F 0 , 0 0 3 0   ( S P ) 
 
 S W C 1 	 F 0 , 0 0 3 4   ( S P ) 
 
 J A L 	 8 0 0 9 0 E 1 C 
 
 S W C 1 	 F 6 , 0 0 1 0   ( S P ) 
 
 / / 8 0 2 C 3 B F 0 : 
 
 L U I 	 A T , 3 F 8 0 	 	 ; z   s c a l e ;   i n   o t h e r   w o r d s ,   s i z e   ( 3 F 4 0   i s   s e n s i b l e ) 
 
 M T C 1 	 A T , F 0 
 
 L U I 	 A T , 4 3 2 0 	 	 ; y   p o s i t i o n 
 
 M T C 1 	 A T , F 8 
 
 L U I 	 A 1 , 8 0 2 C 
 
 A D D I U 	 T 8 , R 0 , 0 0 3 2 
 
 A D D I U 	 T 9 , R 0 , 0 0 1 E 
 
 A D D I U 	 T 0 , R 0 , 0 0 1 E 
 
 A D D I U 	 T 1 , R 0 , 0 0 F F 
 
 A D D I U 	 T 2 , R 0 , 0 0 0 1 
 
 A D D I U 	 T 3 , R 0 , 0 0 0 1 
 
 S W 	 T 3 , 0 0 3 8   ( S P ) 
 
 S W 	 T 2 , 0 0 2 8   ( S P ) 
 
 S W 	 T 1 , 0 0 2 0   ( S P ) 
 
 S W 	 T 0 , 0 0 1 C   ( S P ) 
 
 S W 	 T 9 , 0 0 1 8   ( S P ) 
 
 S W 	 T 8 , 0 0 1 4   ( S P ) 
 
 A D D I U 	 A 1 , A 1 , 5 3 5 0 	 ; A 1 = 8 0 2 C 5 3 5 0 :   t h i r d   l i n e   o f   t e x t 
 
 O R 	 A 0 , S 0 , R 0 
 
 A D D I U 	 A 2 , R 0 , 0 0 1 4 	 ; A 2 = s t r i n g   l e n g t h 
 
 L U I 	 A 3 , 4 2 4 8 	 	 ; x   p o s i t i o n 
 
 S W 	 R 0 , 0 0 2 4   ( S P ) 
 
 S W 	 R 0 , 0 0 2 C   ( S P ) 
 
 S W C 1 	 F 0 , 0 0 3 0   ( S P ) 
 
 S W C 1 	 F 0 , 0 0 3 4   ( S P ) 
 
 J A L 	 8 0 0 9 0 E 1 C 
 
 S W C 1 	 F 8 , 0 0 1 0   ( S P ) 
 
 / / 8 0 2 C 3 C 5 C : 
 
 L W 	 A 0 , 0 0 0 0   ( S 0 ) 	 ; A 0   p l a c e d   a t   S P + 0 
 
 J A L 	 8 0 0 9 1 0 4 C 	 	 ; m o v e s   p o i n t e r   a t   8 0 1 4 6 2 B 4   b a c k   0 x 4 0 
 
 A D D I U 	 A 1 , R 0 , 0 0 0 1 	 ; A 1   p l a c e d   a t   S P + 4 
 
 L W 	 R A , 0 0 4 C   ( S P ) 
 
 L W 	 S 0 , 0 0 4 8   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 5 0 
 
 J R 	 R A 
 
 N O P 
 
 
 
 p e r s o n a l l y   I   t h i n k   t h i s   i s   a   f u n n i e r   m e s s a g e ,   b e i n g   5 - 7 - 5   a n d   a l l . . 
 
 	 	 " P l e a s e   t u r n   o f f   t h e   g a m e 
 
 	 	   a n d   p l u g   a   c o n t r o l l e r   i n 
 
 	 	       c o n t r o l l e r   p o r t   o n e " 
 
 
 
 
 
 w e l l ,   i t ' s   a l l   s t i l l   f i x e d - w i d t h ,   b u t   t h i s   w o u l d   c l e a n   i t   u p   a   l i t t l e : 
 
 + C 9 8   8 0 2 C 3 B 1 8 	 - > 	 3 F 3 0 
 
 + C E 4   8 0 2 C 3 B 6 4 	 - > 	 0 0 1 8 
 
 
 
 + D 0 4   8 0 2 C 3 B 8 4 	 - > 	 3 F 3 0 
 
 + D 4 8   8 0 2 C 3 B C 8 	 - > 	 2 1 3 0 
 
 + D 5 0   8 0 2 C 3 B D 0 	 - > 	 0 0 1 8 
 
 + D 5 4   8 0 2 C 3 B D 4 - > 	 3 C 0 7 4 2 6 0 
 
 
 
 + D 7 0   8 0 2 C 3 B F 0 	 - > 	 3 F 3 0 
 
 + D B 4   8 0 2 C 3 C 3 4 	 - > 	 2 3 2 0 
 
 + D B C   8 0 2 C 3 C 3 C 	 - > 	 0 0 1 3 
 
 + D C 0   8 0 2 C 3 C 4 0 	 - > 	 4 2 9 8 
 
 
 
 m a k e   a   l i t t l e   r o o m   f r o m   m o r e   t e x t   a n d   b e t t e r   c o m p r e s s i o n : 
 
 c o m p a c t   + 2 4 E 4   t a b l e   t o   1 - b y t e   v a l u e s : 
 
 8 0 2 C 3 D 0 8 	 A D D I U   T 3 , T 3 , 5 3 6 4 - > 	 5 3 7 6 	 2 5 6 B 2 1 6 6 
 
 8 0 2 C 3 D 1 8 	 L W - >   L B 	 8 3 1 8 2 1 6 6 	 
 
 8 0 2 C 3 D 9 0 	 S L L   A 1 , V 0 , 0 x 2 - >   O R   A 1 , R 0 , V 0 	 0 0 0 2 2 8 2 5 
 
 8 0 2 C 3 D A 0 	 L W - >   L B 	 8 1 
 
 8 0 2 C 3 D E 4 	 0 0 0 2 2 8 2 5 
 
 8 0 2 C 3 D F 4 	 L W   T 0 , 0 0 0 4   ( T 7 ) - >   L B   T 0 , 0 0 0 1   ( T 7 ) 	 8 1 E 8 0 0 0 1 	 
 
 8 0 2 C 3 E 4 C 	 L W   V 0 , 0 0 1 4   ( T 3 ) - >   L B   V 0 , 0 0 0 6   ( T 3 ) 	 8 1 6 2 0 0 0 6 
 
 ( h m m . . .     t h i s   j u s t   t h r o w s   b a s e .     n e e d   t o   o f f s e t ) 
 
 
 
 8 0 2 C 4 0 1 C 	 S L L   V 0 , V 0 , 0 x 2 - >   N O P 
 
 8 0 2 C 4 0 2 8 	 L W   T 4 , 5 4 2 C   ( T 4 ) - >   L B   T 4 , X X X X   ( T 4 ) 	 
 
 8 0 2 C 4 0 3 4 	 L W   T 8 , 5 4 0 4   ( T 7 ) - >   L B   T 8 , X X X X   ( T 7 ) 	 
 
 8 0 2 C 4 0 3 8 	 L W   T 1 , 5 4 1 8   ( T 1 ) - >   L B   T 1 , X X X X   ( T 1 ) 	 
 
 
 
 8 0 2 C 4 0 7 C 	 S L L   V 0 , V 0 , 0 x 2 - >   N O P 
 
 8 0 2 C 4 0 8 8 	 L W   T 7 , 5 4 6 8   ( T 7 ) - >   L B   T 7 , X X X X   ( T 7 ) 	 
 
 8 0 2 C 4 0 9 4 	 L W   T 1 , 5 4 4 0   ( T 9 ) - >   L B   T 1 , X X X X   ( T 9 ) 	 
 
 8 0 2 C 4 0 9 8 	 L W   T 3 , 5 4 5 4   ( T 3 ) - >   L B   T 3 , X X X X   ( T 3 ) 	 
 
 
 
 8 0 2 C 4 1 3 0 	 S L L   V 0 , V 0 , 0 x 2 - >   N O P 
 
 8 0 2 C 4 1 3 C 	 L W   T 4 , 5 3 F 0   ( T 4 ) - >   L B 	 8 1 
 
 8 0 2 C 4 1 4 8 	 L W   T 8 , 5 3 C 8   ( T 7 ) - >   L B 	 8 1 
 
 8 0 2 C 4 1 4 C 	 L W   T 6 , 5 3 D C   ( T 6 ) - >   L B 	 8 1 
 
 
 
 
 
 = _ = 
 
 
 
 8 0 0 5 A 0 7 0 	 0 x 	 s e l e c t s   o n e   o f   5   t i m e   r e t r i e v a l   r o u t i n e s 
 
 	 c a l l s   s p e c i f i c   o n e   f r o m   t a b l e   a t   8 0 1 1 6 2 A 8 
 
 	 a c c e p t s :   A 0 = t i m e   v a l u e   t o   g r a b 
 
 	 r e t u r n s :   V 0 = v a r i a b l e 
 
 	 f r i e s :   A T , V 1 , T 6   ( T 7   w i t h   o p t i o n   0 ) 
 
 S L T I U 	 A T , A 0 , 0 0 0 5 
 
 B E Q 	 A T , R 0 , 8 0 0 5 A 1 4 8 
 
 O R 	 V 1 , R 0 , R 0 
 
 S L L 	 T 6 , A 0 , 0 x 2 
 
 L U I 	 A T , 8 0 1 1 
 
 A D D U 	 A T , A T , T 6 
 
 L W 	 T 6 , 6 2 A 8   ( A T ) 
 
 J R 	 T 6 
 
 N O P 
 
 8 0 0 5 A 0 9 4 	 r e t u r n s :   V 1 = 0   i f   a . m . 	 f r i e s :   T 7 
 
 L U I 	 T 7 , 8 0 1 3 
 
 L B U 	 T 7 , 6 F B E   ( T 7 ) 	 ; T 7 = h o u r s 
 
 S L T I 	 A T , T 7 , 0 0 0 C 
 
 B E Q 	 A T , R 0 , 8 0 0 5 A 0 B 0 
 
 N O P 
 
 B E Q 	 R 0 , R 0 , 8 0 0 5 A 1 4 8 
 
 O R 	 V 1 , R 0 , R 0 
 
 / / 8 0 0 5 A 0 B 0 : 
 
 B E Q 	 R 0 , R 0 , 8 0 0 5 A 1 4 8 
 
 A D D I U 	 V 1 , R 0 , 0 0 0 1 
 
 8 0 0 5 A 0 B 8 	 #   h o u r s   -   t e n s   p l a c e 
 
 L U I 	 V 1 , 8 0 1 3 
 
 L B U 	 V 1 , 6 F B E   ( V 1 ) 
 
 S L T I 	 A T , V 1 , 0 0 0 C 
 
 B N E L 	 A T , R 0 , 8 0 0 5 A 0 D 4 
 
 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 A D D I U 	 V 1 , V 1 , F F F 4 
 
 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 / / 8 0 0 5 A 0 D 4 : 
 
 D I V 	 V 1 , A T 
 
 M F L O 	 V 1 
 
 B E Q 	 R 0 , R 0 , 8 0 0 5 A 1 4 C 
 
 O R 	 V 0 , V 1 , R 0 
 
 8 0 0 5 A 0 E 4 	 #   h o u r s   -   o n e s   p l a c e 
 
 L U I 	 V 1 , 8 0 1 3 
 
 L B U 	 V 1 , 6 F B E   ( V 1 ) 
 
 S L T I 	 A T , V 1 , 0 0 0 C 
 
 B N E L 	 A T , R 0 , 8 0 0 5 A 1 0 0 
 
 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 A D D I U 	 V 1 , V 1 , F F F 4 
 
 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 / / 8 0 0 5 A 1 0 0 : 
 
 D I V 	 V 1 , A T 
 
 M F H I 	 V 1 
 
 B E Q 	 R 0 , R 0 , 8 0 0 5 A 1 4 C 
 
 O R 	 V 0 , V 1 , R 0 
 
 8 0 0 5 A 1 1 0 	 #   m i n u t e s   -   t e n s   p l a c e 
 
 L U I 	 V 1 , 8 0 1 3 
 
 L B U 	 V 1 , 6 F B D   ( V 1 ) 
 
 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 D I V 	 V 1 , A T 
 
 M F L O 	 V 1 
 
 B E Q 	 R 0 , R 0 , 8 0 0 5 A 1 4 C 
 
 O R 	 V 0 , V 1 , R 0 
 
 8 0 0 5 A 1 2 C 	 #   m i n u t e s   -   o n e s   p l a c e 
 
 L U I 	 V 1 , 8 0 1 3 
 
 L B U 	 V 1 , 6 F B D   ( V 1 ) 
 
 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 D I V 	 V 1 , A T 
 
 M F H I 	 V 1 
 
 B E Q 	 R 0 , R 0 , 8 0 0 5 A 1 4 C 
 
 O R 	 V 0 , V 1 , R 0 
 
 / / 8 0 0 5 A 1 4 8 	 r e t u r n 
 
 O R 	 V 0 , V 1 , R 0 
 
 J R 	 R A 
 
 N O P 
 
 
 
 * * * * * * * * * R E W R I T E * * * * * * * * * 
 
 8 0 0 5 A 0 7 0 	 0 x 8 5 F 0 	 s e l e c t s   o n e   o f   5   t i m e   r e t r i e v a l   r o u t i n e s 
 
 	 c a l l s   s p e c i f i c   o n e   f r o m   t a b l e   a t   8 0 1 1 6 2 A 8 
 
 	 a c c e p t s :   A 0 = t i m e   v a l u e   t o   g r a b 
 
 	 r e t u r n s :   V 0 = v a r i a b l e 
 
 	 f r i e s :   A T , V 1 , T 6   ( T 7   w i t h   o p t i o n   0 ) 
 
 2 C 8 1 0 0 0 5 	 S L T I U 	 A T , A 0 , 0 0 0 5 
 
 1 0 2 0 0 0 2 6 	 B E Q 	 A T , R 0 , 8 0 0 5 A 1 4 8 
 
 0 0 0 0 1 0 2 5 	 O R 	 V 0 , R 0 , R 0 
 
 0 0 0 4 1 0 8 0 	 S L L 	 V 0 , A 0 , 0 x 2 
 
 3 C 0 1 8 0 1 1 	 L U I 	 A T , 8 0 1 1 
 
 0 0 2 2 0 8 2 1 	 A D D U 	 A T , A T , V 0 
 
 8 C 2 1 6 2 A 8 	 L W 	 A T , 6 2 A 8   ( A T ) 
 
 0 0 2 0 0 0 0 8 	 J R 	 A T 
 
 3 C 0 2 8 0 1 3 	 L U I 	 V 0 , 8 0 1 3 
 
 / / 8 0 0 5 A 0 9 4 	 r e t u r n s :   V 1 = 0   i f   a . m . 	 f r i e s :   T 7 
 
 9 0 4 2 6 F B E 	 L B U 	 V 0 , 6 F B E   ( V 0 ) 	 ; T 7 = h o u r s 
 
 2 8 4 2 0 0 0 C 	 S L T I 	 V 0 , V 0 , 0 0 0 C 
 
 1 0 0 0 0 0 1 C 	 B E Q 	 R 0 , R 0 , r e t u r n 
 
 3 8 4 2 0 0 0 1 	 X O R I 	 V 0 , V 0 , 0 0 0 1 
 
 / / 8 0 0 5 A 0 A 4 	 #   h o u r s   -   t e n s   p l a c e 
 
 9 0 4 2 6 F B E 	 L B U 	 V 0 , 6 F B E   ( V 0 ) 
 
 2 8 4 1 0 0 0 C 	 S L T I 	 A T , V 0 , 0 0 0 C 
 
 5 0 2 0 0 0 0 1 	 B E Q L 	 A T , R 0 , + 1 
 
 2 4 4 2 F F F 4 	 A D D I U 	 V 0 , V 0 , F F F 4 	 ; w h e n   p a s t   n o o n ,   s u b t r a c t   1 2 
 
 5 0 4 0 0 0 0 1 	 B E Q L 	 V 0 , R 0 , + 1 	 ; i f   h o u r s = 0 ,   u s e   1 2   i n s t e a d 
 
 2 4 0 2 0 0 0 C 	 A D D I U 	 V 0 , R 0 , 0 0 0 C 
 
 2 4 0 1 0 0 0 A 	 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 0 0 4 1 0 0 1 A 	 D I V 	 V 0 , A T 
 
 1 0 0 0 0 0 1 2 	 B E Q 	 R 0 , R 0 , r e t u r n 
 
 0 0 0 0 1 0 1 2 	 M F L O 	 V 0 
 
 / / 8 0 0 5 A 0 C C 	 #   h o u r s   -   o n e s   p l a c e 
 
 9 0 4 2 6 F B E 	 L B U 	 V 0 , 6 F B E   ( V 0 ) 
 
 2 8 4 1 0 0 0 C 	 S L T I 	 A T , V 0 , 0 0 0 C 
 
 5 0 2 0 0 0 0 1 	 B E Q L 	 A T , R 0 , + 1 
 
 2 4 4 2 F F F 4 	 A D D I U 	 V 0 , V 0 , F F F 4 	 ; w h e n   p a s t   n o o n ,   s u b t r a c t   1 2 
 
 5 0 4 0 0 0 0 1 	 B E Q L 	 V 0 , R 0 , + 1 	 ; i f   h o u r s = 0 ,   u s e   1 2   i n s t e a d 
 
 2 4 0 2 0 0 0 C 	 A D D I U 	 V 0 , R 0 , 0 0 0 C 
 
 1 0 0 0 0 0 0 8 	 B E Q 	 R 0 , R 0 , r e t u r n - 2 
 
 2 4 0 1 0 0 0 A 	 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 / / 8 0 0 5 A 0 E C 	 #   m i n u t e s   -   t e n s   p l a c e 
 
 9 0 4 2 6 F B D 	 L B U 	 V 0 , 6 F B D   ( V 1 ) 
 
 2 4 0 1 0 0 0 A 	 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 0 0 4 1 0 0 1 A 	 D I V 	 V 0 , A T 
 
 1 0 0 0 0 0 0 5 	 B E Q 	 R 0 , R 0 , r e t u r n 
 
 0 0 0 0 1 0 1 2 	 M F L O 	 V 0 
 
 / / 8 0 0 5 A 1 0 0 	 #   m i n u t e s   -   o n e s   p l a c e 
 
 9 0 4 2 6 F B D 	 L B U 	 V 0 , 6 F B D   ( V 0 ) 
 
 2 4 0 1 0 0 0 A 	 A D D I U 	 A T , R 0 , 0 0 0 A 
 
 0 0 4 1 0 0 1 A 	 D I V 	 V 0 , A T 
 
 0 0 0 0 1 0 1 0 	 M F H I 	 V 0 
 
 / / 8 0 0 5 A 1 1 0 	 r e t u r n 
 
 0 3 E 0 0 0 0 8 	 J R 	 R A 
 
 0 0 0 0 0 0 0 0 	 N O P 
 
 
 
 * * * i M P O R T A N T   n O T E * * * 
 
 i f   f o r   s o m e   r e a s o n   i t   r e f u s e s   t o   w o r k   o n   c o n s o l e ,   
 
 i t   m a y   b e   b e c a u s e   t h e   t h e   M F L O / M F H I   c o m m a n d s   a r e   o n   b r a n c h e s   l i k e   t h a t 
 
 n o t   s u r e   i f   i t s   a l l o w e d   b y   t h e   p r o c e s s o r 
 
 
 
 8 0 1 1 6 2 A 8   T A B L E : 	 0 x C 4 8 2 8 
 
 8 0 0 5 A 0 9 4 
 
 8 0 0 5 A 0 A 4 
 
 8 0 0 5 A 0 C C 
 
 8 0 0 5 A 0 E C 
 
 8 0 0 5 A 1 0 0 
 
 
 
 = _ = 
 
 
 
 m e s s a g e   b o a r d   p o s t #   a n d   d a t e 
 
 8 0 3 B 8 E 1 8 : 	 C - 7 2 7 2 6 0 + 1 0 4 8 	 c r e a t e   a n d   w r i t e   p o s t #   t o   s c r e e n 
 
 A D D I U 	 S P , S P , F F C 0 
 
 S W 	 R A , 0 0 3 C   ( S P ) 
 
 S W 	 A 0 , 0 0 4 0   ( S P ) 
 
 S W 	 A 2 , 0 0 4 8   ( S P ) 
 
 S W 	 A 3 , 0 0 4 C   ( S P ) 
 
 L U I 	 A 0 , 8 0 3 C 
 
 A D D I U 	 A 0 , A 0 , 9 7 8 8 	 ; A 0 = 8 0 3 B 9 7 8 8 :   t a r g e t 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 2 	 ; A 2 = m a x   s t r l e n 
 
 O R 	 A 3 , R 0 , R 0 	 ; A 3 = n o r m a l   w r i t e 
 
 J A L 	 8 0 0 9 2 6 4 C 
 
 S W 	 R 0 , 0 0 1 0   ( S P ) 	 ; m a x   s t r l e n = m i n   w i d t h   ( a l i g n e d   r i g h t ,   n o t   l e f t ) 
 
 / / 8 0 3 B 8 E 4 4 : 
 
 L U I 	 A T , 3 F 4 0 
 
 M T C 1 	 A T , F 0 
 
 L W C 1 	 F 4 , 0 0 4 C   ( S P ) 
 
 L U I 	 A 1 , 8 0 3 C 
 
 A D D I U 	 T 6 , R 0 , 0 0 F F 
 
 A D D I U 	 T 7 , R 0 , 0 0 F F 
 
 S W 	 T 7 , 0 0 2 0   ( S P ) 
 
 S W 	 T 6 , 0 0 1 C   ( S P ) 
 
 A D D I U 	 A 1 , A 1 , 9 7 8 8 	 ; A 1 = 8 0 3 B 9 7 8 8 :   s t r i n g   t o   d i s p l a y 
 
 L W 	 A 0 , 0 0 4 0   ( S P ) 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 5 	 ; A 2 = s t r l e n 
 
 L W 	 A 3 , 0 0 4 8   ( S P ) 
 
 S W 	 R 0 , 0 0 1 4   ( S P ) 
 
 S W 	 R 0 , 0 0 1 8   ( S P ) 
 
 S W 	 R 0 , 0 0 2 4   ( S P ) 
 
 S W 	 R 0 , 0 0 2 8   ( S P ) 
 
 S W 	 R 0 , 0 0 3 4   ( S P ) 
 
 S W C 1 	 F 4 , 0 0 1 0   ( S P ) 
 
 S W C 1 	 F 0 , 0 0 2 C   ( S P ) 
 
 J A L 	 8 0 0 9 0 E 9 8 	 ; p r i n t   t e x t   t o   s c r e e n 
 
 S W C 1 	 F 0 , 0 0 3 0   ( S P ) 
 
 / / 8 0 3 B 8 E 9 8 : 
 
 L W 	 R A , 0 0 3 C   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 4 0 
 
 J R 	 R A 
 
 N O P 
 
 
 
 r e t a i n   t h e   s p a c i n g   t o   a v o i d   h a v i n g   t o   o v e r w r i t e   t h e   r i g h t   c o l u m n   w h e n   s w i t c h i n g   b e t w e e n   2 - d i g i t   a n d   1 - d i g i t   n u m b e r s 
 
 Y e a h ,   t h a t ' s   l a z y .     G u e s s   h o w   m u c h   I   c a r e   ; * ) 
 
 " P o s t   # # " 
 
 8 0 3 B 8 E 3 0 : 	 A D D I U 	 A 0 , A 0 , 9 7 8 8 	 - > 	 9 7 8 D 
 
 8 0 3 B 8 E 6 C : 	 A D D I U 	 A 2 , R 0 , 0 0 0 5 	 - > 	 0 0 0 7 
 
 
 
 o r d e r   o f   d a t e   w i l l   n e e d   t o   b e   s w i t c h e d   a b o u t 
 
 T h a t ' s   a s   e a s y   a s   c h a n g i n g   t h e   t a r g e t   a d d r e s s e s   ; * ) 
 
 W i l l   d o   " m o n t h - d a y - y e a r " 
 
 8 0 3 B 8 E A 8 : 	 C - 7 2 7 2 6 0 + 1 0 D 8 	 c r e a t e   a n d   w r i t e   d a t e   t o   s c r e e n 
 
 A D D I U 	 S P , S P , F F C 0 
 
 S W 	 R A , 0 0 3 C   ( S P ) 
 
 S W 	 A 0 , 0 0 4 0   ( S P ) 
 
 S W 	 A 1 , 0 0 4 4   ( S P ) 
 
 S W 	 A 2 , 0 0 4 8   ( S P ) 
 
 S W 	 A 3 , 0 0 4 C   ( S P ) 
 
 / / 8 0 3 B 8 E C 0 : 	 y e a r 
 
 L W 	 T 6 , 0 0 4 4   ( S P ) 
 
 L U I 	 A 0 , 8 0 3 C 
 
 A D D I U 	 T 7 , R 0 , 0 0 0 1 
 
 L H U 	 A 1 , 0 0 0 6   ( T 6 ) 
 
 S W 	 T 7 , 0 0 1 0   ( S P ) 
 
 A D D I U 	 A 0 , A 0 , 9 7 9 0 	 - > 	 9 7 9 6 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 4 
 
 J A L 	 8 0 0 9 2 6 4 C 
 
 O R 	 A 3 , R 0 , R 0 
 
 / / 8 0 3 B 8 E E 4 : 	 m o n t h 
 
 L W 	 T 8 , 0 0 4 4   ( S P ) 
 
 L U I 	 A 0 , 8 0 3 C 
 
 A D D I U 	 T 9 , R 0 , 0 0 0 1 
 
 L B U 	 A 1 , 0 0 0 5   ( T 8 ) 
 
 S W 	 T 9 , 0 0 1 0   ( S P ) 
 
 A D D I U 	 A 0 , A 0 , 9 7 9 5 	 - > 	 9 7 9 0 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 2 
 
 J A L 	 8 0 0 9 2 6 4 C 
 
 O R 	 A 3 , R 0 , R 0 
 
 / / 8 0 3 B 8 F 0 8 : 	 d a y 
 
 L W 	 T 0 , 0 0 4 4   ( S P ) 
 
 L U I 	 A 0 , 8 0 3 C 
 
 A D D I U 	 T 1 , R 0 , 0 0 0 1 
 
 L B U 	 A 1 , 0 0 0 3   ( T 0 ) 
 
 S W 	 T 1 , 0 0 1 0   ( S P ) 
 
 A D D I U 	 A 0 , A 0 , 9 7 9 8 	 - > 	 9 7 9 3 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 2 
 
 J A L 	 8 0 0 9 2 6 4 C 
 
 O R 	 A 3 , R 0 , R 0 
 
 / / 8 0 3 B 8 F 2 C : 	 g o   o n   t o   d i s p l a y   i t 
 
 . . . 
 
 
 
 = _ = 
 
 
 
 c h a r a c t e r   t e x t   b u b b l e s : 
 
 8 0 0 A 3 2 2 0   c a l l s   a l l   t h e   s t u f f   t o   a s s e m b l e   c h a r a c t e r   t e x t   b a l l o o n s   a n d   t e x t 
 
 	 g i v e n   b y   a   r e d i r e c t   t h r o u g h   8 0 0 A 3 3 D 8 
 
 8 0 0 A 2 9 B 0   s e t s   t h e   s c r e e n   p o s i t i o n   f o r   c h a r a c t e r   t e x t   b a l l o o n s 
 
 	 ( s k i p   t h i s   a n d   i t   w i l l   b e   c e n t e r e d   o n - s c r e e n ) 
 
 8 0 0 A 2 C E 4   c o n s t r u c t s   t h e   t e x t   b a l l o o n s   w h e n   y o u   s e t   A 2 = 1 
 
 8 0 0 A 2 D 1 4 	 s e t   c o l o r   o f   m a i n   t e x t   b a l l o o n 
 
 8 0 0 A 2 D 7 C 	 s e t s   t h e   R D P   j u m p   c o m m a n d ,   s e n d i n g   y o u   t o   t h e   b a l l o o n   D L 
 
 	 8 0 1 0 A 7 C 0   i s   t h e   b a l l o o n   D L   i n   q u e s t i o n 
 
 8 0 0 A 2 E A C 	 s e t s   t h e   m a i n   t e x t   b o d y   i n t o   t h e   b a l l o o n 
 
 	 8 0 1 1 7 2 9 8 	 3 A 8 3 1 2 6 F 	 u n k n o w n .     > 1   r e m o v e s   t e x t 
 
 	 8 0 0 A 2 F 3 C 	 3 C 0 1 4 2 C 0 	 x   p o s i t i o n   o f   t e x t 	 - > 4 2 C C 
 
 
 
 	 8 0 0 A 2 9 B 4   d i c t a t e s   y   p o s i t i o n   o f   a l l   b a l l o o n s 
 
 	 8 0 0 A 2 9 D 0   d i c t a t e s   x   p o s i t i o n   o f   a l l   b a l l o o n s 
 
 
 
 s o ,   p u l l e d   w i n d o w s   l e f t   a n d   r i g h t   0 x 7 0 ,   t h e n   s e t   t e x t   x   t o   1 0 2 
 
 
 
 m o v e d   a d v a n c e   a r r o w   t o   c e n t e r   o f   s c r e e n 
 
 x   p o s 	 1 6 0 . 0 	 4 3 2 0 0 0 0 0 
 
 y   p o s 	 1 5 0 . 0 	 4 3 1 6 0 0 0 0 
 
 0 x 5 1 2 1 8 	 8 0 0 A 2 C 9 8 : 	 3 C 0 6 4 3 2 0 	 0 0 0 0 0 0 0 0 
 
 0 x 5 1 2 2 C 	 8 0 0 A 2 C A C : 	 3 C 0 7 4 3 1 6 
 
 
 
 c e n t e r e d   ' A l l   D o n e '   m e s s a g e 
 
 C - 7 2 8 5 A 0 + 6 B 2 	 4 2 C 0 - > 4 2 E 8 
 
 
 
 = _ = 
 
 
 
 + - + 
 
 B a l l o o n s 
 
 Y e a h ,   t h e y   a l s o   w i l l   n e e d   t o   g e t   t h e   r e a l   s t r i n g   l e n g t h 
 
 
 
 w a l k a r o u n d   b u b b l e s : 
 
 8 0 1 4 4 6 A 0   i s   t h e   w o r k i n g   b u f f e r   f o r   t h i s   d a t a 
 
 0 x 0 	 4 	 [ f l o a t ]   
 
 0 x 4 	 4 	 [ f l o a t ]   
 
 0 x 8 	 4 	 [ f l o a t ]   
 
 0 x C 	 4 	 [ f l o a t ]   
 
 0 x 1 0 	 4 	 [ f l o a t ]   
 
 0 x 1 4 	 4 	 [ f l o a t ]   b u b b l e   w i d t h   p e r c e n t a g e ;   a l s o   u s e d   t o   c e n t e r   t e x t 
 
 0 x 1 8 	 2 	 b u b b l e   s t a t e   c o u n t e r ;   c o u l d   m a y b e   g e t   a w a y   w i t h   a   s i n g l e   b y t e . . . 
 
 0 x 1 A 	 2 	 i t e m   # 
 
 0 x 1 C 	 1 	 0 - 4 	 b u b b l e   s t a t e ;   o f f s e t   i n   8 0 1 1 7 B 4 0   p o i n t e r   t a b l e 
 
 	 0 	 b l a n k 
 
 	 1 	 m i n i b u b b l e   1 
 
 	 2 	 m i n i b u b b l e   2 
 
 	 3 	 o p e n :   g r o w   t o   f u l l 
 
 	 4 	 c l o s e :   d i s s o l v e   t o   b l a n k 
 
 0 x 1 D 	 A 	 s t r i n g 
 
 0 x 2 7 	 1 	 T R U E   w h e n   r e s i z i n g   b u b b l e 
 
 
 
 / / 8 0 0 C C 3 2 0 : 	 r i p s   t h e   s t r i n g   a n d   d o e s   s t u f f   t o   i t 
 
 S H 	 T 9 , 0 0 1 A   ( T 0 ) 
 
 J A L 	 8 0 0 9 6 7 4 0 	 ; c o p y   i t e m   A 1 ' s   n a m e   t o   A 0 
 
 L H U 	 A 1 , 0 0 4 2   ( S P ) 
 
 L U I 	 A 0 , 8 0 1 4 
 
 A D D I U 	 A 0 , A 0 , 4 6 B D 	 ; A 0 = 8 0 1 4 4 6 B D :   s t a r t   o f   s t r i n g 
 
 A D D I U 	 A 1 , R 0 , 0 0 0 A 	 ; m a x   s t r i n g   l e n g t h 
 
 J A L 	 8 0 0 9 C 1 C 0 	 ; r e t u r n s   V 0 = a c t u a l   s t r l e n 
 
 A D D I U 	 A 2 , R 0 , 0 0 2 0 	 ; p o s s i b l y   a   s p a c e .     c o u l d   b e   a   t a k e   o n   s t r t o k 
 
 / / 8 0 0 C C 3 4 0 : 
 
 M T C 1 	 V 0 , F 1 8 
 
 L U I 	 A T , 4 0 0 0 	 ; A T = 2 . 0 
 
 M T C 1 	 A T , F 6 
 
 C V T . S . W 	 F 4 , F 1 8 	 ; F 4 = # c h a r s   i n   s t r i n g 
 
 L U I 	 A T , 4 1 0 0 	 ; A T = 8 . 0 
 
 M T C 1 	 A T , F 8 
 
 L U I 	 T 0 , 8 0 1 4 
 
 A D D I U 	 T 0 , T 0 , 4 6 A 0 
 
 S U B . S 	 F 1 0 , F 4 , F 6 	 ; F 1 0 = # c h a r s - 2 . 0 
 
 D I V . S 	 F 1 6 , F 1 0 , F 8 	 ; F 1 6 = ( # c h a r s - 2 . 0 )   /   8 . 0 	 e n d s   f i t   i n   c a p s .     F 1 6 = a m o u n t   y o u   n e e d   t o   s h r i n k   b a l l o o n   s o   t e x t   f i t s   c e n t e r e d 
 
 S W C 1 	 F 1 6 , 0 0 1 4   ( T 0 ) 	 ; F 1 6 - > 8 0 1 4 4 6 B 4 
 
 B E Q 	 R 0 , R 0 , 8 0 0 C C 3 7 8 
 
 L B U 	 A 0 , 0 0 1 C   ( T 0 ) 	 ; A 0 = t y p i e - t h i n g i e ? 
 
 / / 8 0 0 C C 3 7 4 : 
 
 S H 	 R 0 , 0 0 1 A   ( T 0 ) 	 ; k i l l   t h e   i t e m   o t h e r w i s e 
 
 B E Q L 	 A 0 , R 0 , 8 0 0 C C 3 E 0 
 
 L W 	 R A , 0 0 1 C   ( S P ) 
 
 J A L 	 8 0 0 8 7 C 8 8 
 
 	 L U I 	 T 6 , 8 0 1 4 
 
 	 L W 	 T 6 , A 2 4 8   ( T 6 ) 
 
 	 L H U 	 V 0 , 0 0 0 0   ( T 6 ) 
 
 	 J R 	 R A 
 
 	 N O P 
 
 N O P 
 
 L U I 	 T 0 , 8 0 1 4 
 
 A N D I 	 T 1 , V 0 , F 0 0 0 
 
 B N E Z 	 T 1 , 8 0 0 C C 3 B 0 
 
 A D D I U 	 T 0 , T 0 , 4 6 A 0 	 ; T 0 = 8 0 1 4 4 6 A 0 
 
 J A L 	 8 0 0 7 D 7 B C 
 
 N O P 
 
 / / 8 0 0 C C 3 A 0 : 
 
 
 
 I ' m   m o r e   i n t e r e s t e d   i n   h o w   t h a t   0 x 1 4   v a l u e   i s   u s e d . . . 
 
 T h i s   d o e s   b a l l o o n   w i d t h 
 
 / / 8 0 0 C C 5 8 4 : 
 
 L U I 	 A T , 8 0 1 4 
 
 L W C 1 	 F 1 4 , 4 6 A 8   ( A T ) 	 ; F 1 4 = 8 0 1 4 4 6 A 8 :   1 . 0 
 
 L U I 	 A T , 8 0 1 1 
 
 L W C 1 	 F 8 , 7 B 6 4   ( A T ) 	 ; F 8 = 8 0 1 1 7 B 6 4 :   0 . 6 6 6 6 6 7 
 
 L U I 	 A T , 8 0 1 4 
 
 L W C 1 	 F 1 0 , 4 6 B 4   ( A T ) 	 ; F 1 0 = 8 0 1 4 4 6 B 4 :   v a l u e 
 
 L U I 	 A T , 8 0 1 1 
 
 L W C 1 	 F 1 8 , 7 B 6 8   ( A T ) 	 ; F 1 8 = 0 . 3 3 3 3 3 3 
 
 M U L . S 	 F 1 6 , F 8 , F 1 0 	 ; F 1 6 = v a l u e   *   0 . 6 6 6 6 6 7 
 
 M F C 1 	 A 2 , F 1 4 
 
 A D D I U 	 A 3 , R 0 , 0 0 0 1 
 
 A D D . S 	 F 4 , F 1 6 , F 1 8 	 ; F 4 = ( v a l u e   *   0 . 6 6 6 6 6 7 )   +   0 . 3 3 3 3 3 3 
 
 M U L . S 	 F 1 2 , F 4 , F 1 4 	 ; F 1 2 = 1 . 0   *   F 4 
 
 J A L 	 8 0 0 E 0 4 1 C 
 
 N O P 
 
 
 
 a g a i n   a t : 	 d o e s   t e x t   p o s i t i o n i n g 
 
 / / 8 0 0 C C 9 0 8 : 
 
 M T C 1 	 A T , F 0 	 ; F 0 = [ 0 . 8 7 5 ] 
 
 L U I 	 A T , 4 2 D 6 
 
 M T C 1 	 A T , F 1 0 	 ; F 1 0 = 1 0 7 . 0 
 
 L U I 	 A T , 3 F 8 0 
 
 M T C 1 	 A T , F 1 8 	 ; F 1 8 = 1 . 0 
 
 L W C 1 	 F 8 , 0 0 0 0   ( V 0 ) 	 ; F 8 = 8 0 1 4 4 6 A 0 :   5 4 . 0 8 9 6 3 
 
 L W C 1 	 F 4 , 0 0 1 4   ( V 0 ) 	 ; F 4 = 8 0 1 4 4 6 B 4 :   v a l u e 
 
 L U I 	 A T , 4 2 2 C 
 
 A D D . S 	 F 1 6 , F 8 , F 1 0 	 ; F 1 6 = 1 6 1 . 0 8 9 6 
 
 M T C 1 	 A T , F 8 	 ; F 8 = 4 3 . 0 	 h a l f   t h e   b u b b l e ' s   w i d t h   ( f u l l   w o u l d   o f f s e t   t o   c e n t e r ) 
 
 L U I 	 A T , 4 2 E 2 
 
 S U B . S 	 F 6 , F 1 8 , F 4 	 ; F 6 = 1 . 0 - v a l u e 
 
 L W C 1 	 F 4 , 0 0 0 4   ( V 0 ) 	 ; F 4 = 8 0 1 4 4 6 A 4 :   - 3 9 . 7 0 2 3 2 
 
 L U I 	 A 1 , 8 0 1 4 
 
 A D D I U 	 T 3 , R 0 , 0 0 2 D 
 
 M U L . S 	 F 1 0 , F 6 , F 8 	 ; F 1 0 = ( 1 . 0 - v a l u e )   *   4 3 . 0 
 
 M T C 1 	 A T , F 6 	 ; F 6 = 1 1 3 . 0 
 
 L U I 	 A T , 4 3 7 F 
 
 A D D I U 	 T 4 , R 0 , 0 0 2 D 
 
 A D D I U 	 T 5 , R 0 , 0 0 2 3 
 
 A D D . S 	 F 8 , F 4 , F 6 	 ; F 8 = - 3 9 . 7 0 2 3 2   +   1 1 3 . 0 = 7 3 . 2 9 7 6 9 
 
 A D D I U 	 T 7 , R 0 , 0 0 0 1 
 
 S W 	 T 7 , 0 0 3 4   ( S P ) 	 ; 1 - > S P + 0 x 3 4 
 
 / / 8 0 0 C C 9 6 4 : 
 
 A D D . S 	 F 1 8 , F 1 6 , F 1 0 	 ; F 1 8 = 1 6 1 . 0 8 9 6 + ( 1 . 0 - v a l u e )   *   4 3 . 0 
 
 M T C 1 	 A T , F 1 6 	 ; F 1 6 = 2 5 5 . 0 
 
 S W C 1 	 F 8 , 0 0 1 0   ( S P ) 	 ; 7 3 . 2 9 7 6 9 - > S P + 1 0 
 
 S W 	 T 5 , 0 0 1 C   ( S P ) 	 ; 2 3 - > S P + 1 C 
 
 M U L . S 	 F 1 0 , F 1 6 , F 2 	 ; F 1 0 = 2 5 5   *   1 
 
 M F C 1 	 A 3 , F 1 8 	 ; A 3 = c o n v e r t e d   v a l u e 	 x = p o s i t i o n   o f   t e x t   o n - s c r e e n 
 
 S W 	 T 4 , 0 0 1 8   ( S P ) 	 ; 2 D - > S P + 1 8 
 
 S W 	 T 3 , 0 0 1 4   ( S P ) 	 ; 2 D - > S P + 1 4 
 
 A D D I U 	 A 1 , A 1 , 4 6 B D 	 ; A 1 = 8 0 1 4 4 6 B D :   i t e m   t e x t   t o   a p p e a r 
 
 L W 	 A 0 , 0 0 B 8   ( S P ) 	 ; A 0 = [ 8 0 2 2 9 0 5 0 ] 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 A 	 ; f o r c e d   s t r l e n   =   1 0 
 
 T R U N C . W . S 	 F 1 8 , F 1 0 	 ; F 1 8 = F F 
 
 S W 	 R 0 , 0 0 2 4   ( S P ) 
 
 S W 	 R 0 , 0 0 2 8   ( S P ) 
 
 S W C 1 	 F 0 , 0 0 2 C   ( S P ) 	 ; 0 . 8 7 5 - > S P + 2 C 
 
 M F C 1 	 T 8 , F 1 8 
 
 S W C 1 	 F 0 , 0 0 3 0   ( S P ) 	 ; 0 . 8 7 5 - > S P + 3 0 
 
 J A L 	 8 0 0 9 0 E 9 8 	 ; p r i n t   t e x t   t o   s c r e e n 
 
 S W 	 T 8 , 0 0 2 0   ( S P ) 	 ; F F - > S P + 2 0 
 
 / / 8 0 0 C C 9 B 0 : 
 
 L W 	 R A , 0 0 4 4   ( S P ) 
 
 L W 	 S 0 , 0 0 4 0   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 B 8 
 
 J R 	 R A 
 
 N O P 
 
 
 
 W h a t ' s   h a p p e n i n g   i s   t h i s : 
 
 T h e   b u b b l e   w i l l   a l w a y s   b e   b i g   e n o u g h   f o r   t w o   c h a r a c t e r s . 
 
   T h e   e x p a n d a b l e   b o d y   o f   t h e   b u b b l e   i s   s i z e d   f o r   u p   t o   8   m o r e 
 
   S o ,   y o u   g r a b   h a l f   t h e   n u m b e r   o f   c h a r a c t e r s   a n d   d i v i d e   b y   8   t o   d e t e r m i n e   t h e   p e r c e n t a g e   y o u   n e e d   t o   i n f l a t e   t h e   b a l l o o n 
 
 T h e   t e x t   i s   s e t   t o   a p p e a r   a t   t h e   e d g e   o f   t h e   b a l l o o n   w h e n   e x p a n d e d   t o   f u l l   w i d t h 
 
   I f   i t   i s   s m a l l e r ,   i t   g e t s   o f f s e t   u p   t o   6 7   s p a c e s   r i g h t 
 
   t h e   r a t i o   i s   8 . 3 7 5 ,   o r   8   3 / 8   p e r   c h a r 
 
 
 
 W h a t   t h a t   b a s i c a l l y   m e a n s   i s   t h a t   t h e   r o u t i n e : 
 
 1 )   w i l l   b e   k a p u t   f o r   l o n g e r   s t r i n g s 	 n o   i t   w o n ' t .     m u l t i p l i e r s ,   d u h . 
 
 2 )   h a s   t o   b e   c o m p l e t e l y   r e w r i t t e n   f r o m   s c r a t c h 
 
 t o   g e t   i t   p e r f e c t : 
 
 1 )   s h o u l d   g e t   w i d t h   o f   s t r i n g 
 
 2 )   u s e   a   m u l t i p l i e r   a g a i n s t   s t r i n g   w i d t h   t o   g e t   b a l l o o n   s i z e 
 
 3 )   o f f s e t   s t r i n g   m a g i c a l l y 
 
 
 
 i n c i d e n t a l l y ,   t h e   b y t e   r i g h t   a f t e r   t h e   t e x t   d i s p l a y e d   i s   u s e d   b y   s o m e t h i n g 
 
 o t h e r w i s e ,   t h e r e   d o e s n t '   + s e e m +   t o   b e   a n y t h i n g   u s e d   f o r   n e x t   1 2   b y t e s   ( 0 x C ) 
 
 
 
 t h i n g   t h a t   f i r s t   u s e s   t h a t   r e d i r e c t i o n a l   b y t e   t h i n g y 
 
 / / 8 0 0 C C 0 3 0 : 	 u s e s   0 x 1 C   b y t e .     
 
 L U I 	 T 0 , 8 0 1 4 
 
 A D D I U 	 T 0 , T 0 , 4 6 A 0 
 
 L B U 	 A 1 , 0 0 1 C   ( T 0 ) 
 
 S H 	 V 0 , 0 0 4 2   ( S P ) 	 ; s a v e   i t e m # 
 
 S L T I U 	 A T , A 1 , 0 0 0 5 
 
 B E Q 	 A T , R 0 , 8 0 0 C C 1 A 4 
 
 O R 	 A 0 , A 1 , R 0 
 
 S L L 	 T 8 , A 1 , 0 x 2 	 ; T 8 = b y t e - > o f f s e t 
 
 L U I 	 A T , 8 0 1 1 
 
 A D D U 	 A T , A T , T 8 
 
 L W 	 T 8 , 7 B 4 0   ( A T ) 	 ; 8 0 1 1 7 B 4 0 :   8 0 0 C C 0 6 4 , 8 0 0 C C 0 9 4 , 8 0 0 C C 0 9 4 , 8 0 0 C C 0 C 0 , 8 0 0 C C 1 2 0 
 
 J R 	 T 8 
 
 N O P 
 
 
 
 O h ,   d i d   I   m e n t i o n . . . 
 
 T h e y   h a v e   a   + c o m p l e t e l y   d i f f e r e n t +   s e t   o f   c o d e   f o r   t h e   b a l l o o n s   i n   t h e   i n v e n t o r y   ; * ) 
 
 K i m i   d o e s n ' t   l i k e   t h e m .     N o t   o n e   b i t . 
 
 
 
 8 0 3 C 5 7 3 8 :   t h e   4 1 4 0   h e r e   i s   u s e d   t o   o f f s e t   d e s c r i p t i v e   t e x t   i n   t h e   i n v e n t o r y 
 
 	 i e .   p a c k a g e   t o / f r o m   l i n e s ,   e t c 
 
 
 
 8 0 3 C 6 8 5 C   s t a r t s   t h e   h o r r o r s   o f   i t s   t e x t   b a n k ,   j u s t   l i k e   t h e   p a c k a g e   t h i n g 
 
 n o t   a s   b a d   r e a l l y .     T h e   t e x t   a n d   e d g e   o f   b a l o o n   a r e   s t a t i c .     J u s t   r i g h t   e d g e   e x t e n d s   o u t   ( h o p e f u l l y ) 
 
 8 0 1 4 5 3 0 0   s t o w s   p - > s   t o   a   s l e w   o f   D L s 
 
 0 x 0 	 	 ? 
 
 0 x 4 	 4 	 p - > s t a r t 
 
 0 x 8 	 4 	 p - > e n d 
 
 0 x C 	 4 	 p - > ?   m a x   ? 
 
 
 
 
 
 + - + 
 
 F O R   T H E   R E C O R D ,   s m o o s h   t h e   " S e t   C l o c k "   t e x t   b u b b l e   a   l i t t l e 
 
 a l s o ,   s m o o s h   t h e   t e x t   b u b b l e   f o r   n a m e ,   o r   m a k e   s t r i n g   m o r e   i n t r i c a t e 
 
 f o r   c l o c k ,   w i l l   j u s t   e x t e n d   t e x t . 
 
 N e w   t a b l e   r e a d s : 	 C - 7 1 D C E 0 
 
 p r e v i o u s 	 n e w 
 
 8 0 3 B 8 E 1 0 	 8 0 3 B 8 E 1 0 	 " S e t   C l o c k   T i m e " 
 
 8 0 3 B 8 E 1 9 	 8 0 3 B 8 E 1 F 	 " 2 0         Y             M             D " 
 
 8 0 3 B 8 E 3 0 	 8 0 3 B 8 E 3 4 	 " : " 
 
 8 0 3 B 8 E 3 4 	 8 0 3 B 8 E 3 5 	 " O K ! " 
 
 8 0 3 B 8 8 4 4 	 0 x A 7 4 	 A D D I U 	 A 2 , R 0 , 0 0 0 9 	 - > 	 0 0 0 E 
 
 8 0 3 B 8 8 8 4 	 0 x A B 4 	 A D D I U 	 A 1 , A 1 , 8 E 1 9 	 - > 	 8 E 1 F 
 
 8 0 3 B 8 8 E 8 	 0 x B 1 8 	 A D D I U 	 A 1 , A 1 , 8 E 3 0 	 - > 	 8 E 3 4 
 
 8 0 3 B 8 A 2 0 	 0 x C 5 0 	 A D D I U 	 A 1 , A 1 , 8 E 3 4 	 - > 	 8 E 3 5 
 
 
 
 i n   i t s   b i n a r i e s : 	 C - 7 1 D C E 0 
 
 8 0 3 B 8 1 D 8 : 	 0 x 4 0 8 	 a l l o w   d a t e s   >   2 0 3 0 
 
 2 4 0 D 0 0 0 1 	 A D D I U 	 T 5 , R 0 , 0 0 0 1 	 - > 	 0 0 0 0 	 ; m i n   d a t e 
 
 2 9 8 1 0 0 1 F 	 S L T I 	 A T , T 4 , 0 0 1 F 	 - > 	 0 0 6 4 	 ; m a x   y e a r :   2 1 0 0 
 
 5 4 2 0 0 0 1 B 	 B N E L 	 A T , R 0 , 8 0 3 B 8 2 5 0 
 
 2 7 A 4 0 0 3 4 	 A D D I U 	 A 0 , S P , 0 0 3 4 
 
 1 0 0 0 0 0 1 8 	 B E Q 	 R 0 , R 0 , 8 0 3 B 8 2 4 C 
 
 A 7 A D 0 0 2 8 	 S H 	 T 5 , 0 0 2 8   ( S P ) 
 
 
 
 8 0 3 B 8 2 0 8 	 B L E Z 	 A 0 , 8 0 3 B 8 2 2 C 	 - > 	 0 4 8 0 0 0 0 8 	 B L T Z 	 A 0 , 8 0 3 B 8 2 2 C 
 
 8 0 3 B 8 2 1 8 
 
 3 3 2 8 F F F F 	 A N D I 	 T 0 , T 9 , F F F F 	 - > 	 0 0 1 9 4 0 2 5 	 O R 	 T 0 , R 0 , T 9 
 
 1 D 0 0 0 0 0 B 	 B G T Z 	 T 0 , 8 0 3 B 8 2 4 C 	 - > 	 0 5 0 1 0 0 0 B 	 B G E Z 	 T 0 , 8 0 3 B 8 2 4 C 
 
 2 4 0 9 0 0 1 E 	 A D D I U 	 T 1 , R 0 , 0 0 1 E 	 - > 	 0 0 6 3 	 ; m a x   y e a r   2 0 9 9 
 
 1 0 0 0 0 0 0 9 	 B E Q 	 R 0 , R 0 , 8 0 3 B 8 2 4 C 
 
 A 7 A 9 0 0 2 8 	 S H 	 T 1 , 0 0 2 8   ( S P ) 
 
 
 
 
 
 8 0 3 B 8 7 7 0 - 8 0 3 B 8 A A 4 	 w r i t e s   a l l   t e x t   ( i n c l u d i n g   y e a r )   o n   ' s e t   t i m e '   d i a l o g 
 
 i n   p a r t i c u l a r : 
 
 8 0 3 B 8 9 2 C : 	 d i s p l a y s   t h e   e d i t a b l e   v a l u e s   o n   d a t e   s e t t i n g   d i a l o g 
 
 2 7 B 3 0 0 9 8 	 A D D I U 	 S 3 , S P , 0 0 9 8 
 
 9 6 2 5 0 0 0 0 	 L H U 	 A 1 , 0 0 0 0   ( S 1 ) 
 
 2 4 0 F 0 0 0 1 	 A D D I U 	 T 7 , R 0 , 0 0 0 1 
 
 A F A F 0 0 1 0 	 S W 	 T 7 , 0 0 1 0   ( S P ) 	 ; t h i s   i s   w h a t   s e t s   i t   t o   d i s p l a y   0 s 
 
 0 2 6 0 2 0 2 5 	 O R 	 A 0 , S 3 , R 0 
 
 2 4 0 6 0 0 0 2 	 A D D I U 	 A 2 , R 0 , 0 0 0 2 
 
 0 C 0 2 4 9 9 3 	 J A L 	 8 0 0 9 2 6 4 C 
 
 0 0 0 0 3 8 2 5 	 O R 	 A 3 , R 0 , R 0 
 
 
 
 / / 8 0 3 B 8 2 0 C 	 d e c r e m e n t   t i m e   o n   s e t   c l o c k   d o o h i c k 
 
 A D D I U 	 T 9 , A 0 , F F F F 
 
 B N E Z 	 V 1 , 8 0 3 B 8 2 2 C 
 
 S H 	 T 9 , 0 0 0 0   ( V 0 ) 
 
 O R 	 T 0 , R 0 , T 9 
 
 B G E Z 	 T 0 , 8 0 3 B 8 2 4 C 
 
 A D D I U 	 T 1 , R 0 , 0 0 6 3 
 
 
 
 
 
 = _ = 
 
 
 
 N a m e   e n t r y   p a g e ! 
 
 8 0 1 2 6 E C 0 	 s t r i n g   t y p e d   i n t o   n a m e   d i a l o g 
 
 
 
 8 0 3 B 9 7 A 4 : 	 	 a p p e n d   c h a r a c t e r   i f   n o t   a   r e t u r n   o r   E O L 
 
 A D D I U 	 S P , S P , F F E 8 
 
 S W 	 R A , 0 0 1 4   ( S P ) 
 
 L B U 	 T 6 , 0 0 1 3   ( A 0 ) 	 ; T 6 = c h a r 
 
 A D D I U 	 A T , R 0 , 0 0 C D 
 
 B E Q L 	 T 6 , A T , 8 0 3 B 9 7 D 8 
 
 L W 	 R A , 0 0 1 4   ( S P ) 
 
 L H 	 T 7 , 0 0 1 8   ( A 0 ) 	 ; T 7 = m a x   s t r l e n 
 
 L H 	 T 8 , 0 0 1 C   ( A 0 ) 	 ; T 8 = c u r   s t r l e n 
 
 B E Q L 	 T 7 , T 8 , 8 0 3 B 9 7 D 8 	 ; s k i p   i f   m a x   s i z e 
 
 L W 	 R A , 0 0 1 4   ( S P ) 
 
 J A L 	 8 0 3 B 9 7 3 C 
 
 N O P 
 
 L W 	 R A , 0 0 1 4   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 1 8 
 
 J R 	 R A 
 
 N O P 
 
 
 
 8 0 3 B 9 7 3 C : 	 	 w r i t e   n e w l y - e n t e r e d   c h a r a c t e r   t o   s t r i n g   b u f f e r 
 
 L H 	 V 1 , 0 0 1 C   ( A 0 ) 	 ; V 1 = c o u n t ? 	 A 0 = 8 0 3 B C 5 0 0 
 
 L H 	 A 2 , 0 0 1 6   ( A 0 ) 	 ; A 2 = c o u n t ? 
 
 L W 	 T 6 , 0 0 2 4   ( A 0 ) 	 ; T 6 = 8 0 1 2 6 E C 0 :   s t r i n g 
 
 O R 	 A 1 , V 1 , R 0 	 ; A 1 = V 1 = c o u n t ? 
 
 S L T 	 A T , A 2 , V 1 	 ; 
 
 B E Q 	 A T , R 0 , 8 0 3 B 9 7 7 C 
 
 A D D U 	 V 0 , T 6 , V 1 
 
 L B U 	 T 7 , F F F F   ( V 0 ) 
 
 / / 8 0 3 B 9 7 5 C : 
 
 A D D I U 	 A 1 , A 1 , F F F F 
 
 A D D I U 	 V 0 , V 0 , F F F F 
 
 S B 	 T 7 , 0 0 0 1   ( V 0 ) 
 
 L H 	 A 2 , 0 0 1 6   ( A 0 ) 
 
 S L T 	 A T , A 2 , A 1 
 
 B N E L 	 A T , R 0 , 8 0 3 B 9 7 5 C 
 
 L B U 	 T 7 , F F F F   ( V 0 ) 
 
 L H 	 V 1 , 0 0 1 C   ( A 0 ) 
 
 / / 8 0 3 B 9 7 7 C : 	 a p p e n d   c h a r a c t e r   t o   s t r i n g 
 
 L B U 	 T 0 , 0 0 1 3   ( A 0 ) 	 ; T 0 = c h a r 
 
 A D D I U 	 T 8 , A 2 , 0 0 0 1 	 ; T 8 = c o u n t + + ? 
 
 A D D I U 	 T 9 , V 1 , 0 0 0 1 	 ; T 9 = c o u n t + + ? 
 
 S H 	 T 8 , 0 0 1 6   ( A 0 ) 
 
 S H 	 T 9 , 0 0 1 C   ( A 0 ) 
 
 A D D I U 	 T 1 , R 0 , 0 0 0 1 
 
 S B 	 T 0 , 0 0 0 0   ( V 0 ) 	 ; c h a r - > s t r i n g 
 
 S B 	 T 1 , 0 0 1 5   ( A 0 ) 	 ; 1 - > 8 0 3 B C 5 1 5 
 
 J R 	 R A 
 
 N O P 
 
 
 
 f i n e ,   f i n e .     T h e   p e r t i n e n t   s t u f f . . . 
 
 / / 8 0 3 B 8 3 D 0 : 	 p a r t   o f   t h e   w r i t i n g - s t u f f - t o - s c r e e n   c o d e 
 
 S W 	 R 0 , 0 0 3 4   ( S P ) 	 ; t h i s   s e t s   t h e   t e x t   r e n d e r   m o d e   t o   v a r . 
 
 S W 	 R 0 , 0 0 2 8   ( S P ) 
 
 S W 	 R 0 , 0 0 2 4   ( S P ) 
 
 L W 	 A 0 , 0 0 9 4   ( S P ) 
 
 S W C 1 	 F 2 0 , 0 0 2 C   ( S P ) 
 
 J A L 	 8 0 0 9 0 E 9 8 	 ; A 1   p o i n t s   t o   t h e   ' S e t   % B L A H %   N a m e '   s t r i n g   i n   m _ l e d i t _ o v l 
 
 S W C 1 	 F 2 0 , 0 0 3 0   ( S P ) 
 
 
 
 / / 8 0 3 B 8 3 E C : 
 
 L W C 1 	 F 8 , 0 0 7 4   ( S P ) 
 
 L W 	 T 4 , 0 0 8 8   ( S P ) 
 
 L W 	 A 1 , 0 0 2 4   ( S 4 ) 
 
 L H 	 A 2 , 0 0 1 8   ( S 4 ) 
 
 S W C 1 	 F 8 , 0 0 1 0   ( S P ) 
 
 L B U 	 T 6 , 0 0 1 C   ( T 4 ) 
 
 A D D I U 	 T 9 , R 0 , 0 0 F F 	 ; T 9 = b l a c k   t e x t ?     P r o b a b l y   c o l o r e d   l a t e r   w i t h   R D P - b g c o l o r 
 
 L W 	 A 0 , 0 0 9 4   ( S P ) 
 
 S W 	 T 6 , 0 0 1 4   ( S P ) 
 
 L B U 	 T 7 , 0 0 1 D   ( T 4 ) 
 
 L W 	 A 3 , 0 0 7 8   ( S P ) 
 
 S W 	 T 7 , 0 0 1 8   ( S P ) 
 
 L B U 	 T 5 , 0 0 1 E   ( T 4 ) 
 
 S W 	 R 0 , 0 0 3 4   ( S P ) 
 
 S W C 1 	 F 2 4 , 0 0 3 0   ( S P ) 
 
 S W C 1 	 F 2 4 , 0 0 2 C   ( S P ) 
 
 S W 	 R 0 , 0 0 2 8   ( S P ) 	 ; I   d o n ' t   t h i n k   t h i s   w o u l d   h a v e   c h a n g e d . . . 
 
 S W 	 R 0 , 0 0 2 4   ( S P ) 	 ; I   d o n ' t   t h i n k   t h i s   w o u l d   h a v e   c h a n g e d . . . 
 
 S W 	 T 9 , 0 0 2 0   ( S P ) 	 ; l i k e w i s e . . . 
 
 J A L 	 8 0 0 9 0 E 9 8 	 ; p r i n t   t e x t   t o   s c r e e n 
 
 S W 	 T 5 , 0 0 1 C   ( S P ) 	 ; l i k e w i s e 
 
 / / 8 0 3 B 8 4 4 0 
 
 
 
 B A C K T R A C E ! 
 
 r o u t e s   t h i s   a r o u n d : 
 
 8 0 0 9 0 E 9 8 , 8 0 0 9 0 C C 0 , 8 0 0 9 1 E 0 C , 8 0 0 9 1 C 9 8 , 8 0 0 9 1 8 A 8 , 8 0 0 9 1 7 C 8 , 8 0 0 9 0 2 8 C 
 
 8 0 0 9 0 C C 0 	 
 
 	 S P - = F 0 ;   S P + 1 1 8   =   S P + 2 8   f r o m   c a l l e r   [ 7 7 0 ] 
 
 	 8 0 0 9 0 D 6 4 	 i f   S P + 1 1 8 ! = 0 ,   s e t   f i x e d - w i d t h 
 
 8 0 0 9 1 A B 0 	 A 3 - > S P + 5 4 ,   s t o r e d   a g a i n   t o   S 0 + 8 
 
 	 8 0 0 9 1 B 8 8 	 i f   S 0 + 8   & 1   ! = 0 ,   t h e n   i t   s e t s   f i x e d - w i d t h 
 
 8 0 0 9 1 5 D 8 	 A 3 = m o d e   t h i n g y 
 
 
 
 F I X !     l e t s   h o p e   i t   a l w a y s   r e t u r n s   V 1 = 1   ; * ) 
 
 C - 7 1 E A F 0 + 6 5 C 	 
 
 8 0 3 B 8 4 2 C : 	 A F A 3 0 0 2 8 	 S W 	 V 1 , 0 0 2 8   ( S P ) 	 ; I   d o n ' t   t h i n k   t h i s   w o u l d   h a v e   c h a n g e d . . . 
 
 
 
 S i l l y   s u p e r f i c i a l   s t u f f : 
 
 " Y o u r   N a m e ? " 
 
 x : 	 4 3 0 E 0 0 0 0 	 1 4 2 . 0 
 
 " T o w n ' s   N a m e ? " 
 
 x : 	 4 3 0 8 0 0 0 0 	 1 3 6 . 0 
 
 
 
 = _ = 
 
 s c r i p t   p r o b l e m s ! 
 
 f i r s t ,   a n y t h i n g   o v e r   0 x 4 0 0   n e e d s   t o   b e   s h o r t e n e d   o r   s p l i t 
 
 s e c o n d ,   y o u   c a n ' t   l e a v e   b l a n k   e n t r i e s !     f i l l   w i t h   [ c l o s e ]   o r   s o m e t h i n g 
 
 
 
 c h a r a c t e r s   a r e   d r a w i n g   t h e i r   7 F 1 C   n a m e s   f r o m   t h e   o r i g i n a l   s t r i n g   b a n k   s o m e h o w . . . 
 
 . . . o r   t h e   s t u f f   w a s   w r i t t e n   i n t o   t h e   s a v e   f i l e ,   w h i c h   i s   h i g h l y   p r o b a b l e 
 
 s t r i n g + 7 D 	 F 1   1 7 
 
 s t r i n g + 2 4 7 	 F 1   A B   A B   B D 
 
 s t r i n g + 2 7 B 	 F 1   5 B   C 3 
 
 
 
 
 
 = _ = 
 
 
 
 t e x t   e n t r y   d i a l ! 
 
 8 0 3 B 8 B 5 0 : 	 C - 7 1 F 4 E 0 + 0 	 p u l l   p o i n t e r   t o   t e x t   a n d   # s 
 
 9 0 8 3 0 0 0 4 	 
 
 3 C 0 F 8 0 3 C 	 
 
 3 C 1 8 8 0 3 C 	 
 
 1 0 6 0 0 0 0 4 	 
 
 0 0 0 0 0 0 0 0 	 
 
 2 4 0 1 0 0 0 2 	 
 
 1 4 6 1 0 0 0 B 	 
 
 0 0 A 6 2 0 2 1 	 
 
 1 0 E 0 0 0 0 5 	 
 
 0 0 A 6 2 0 2 1 	 
 
 0 0 8 0 0 8 2 1 	 
 
 0 0 0 4 2 0 8 0 	 
 
 1 0 0 0 0 0 0 5 	 
 
 0 0 8 1 2 0 2 1 	 
 
 0 0 0 5 7 0 8 0 	 
 
 0 1 C 5 7 0 2 1 	 
 
 1 0 0 0 0 0 0 1 	 
 
 0 1 C 6 2 0 2 1 	 
 
 0 0 0 3 2 8 8 0 	 
 
 0 1 E 5 7 8 2 1 	 
 
 8 D E F B F E C 	 
 
 0 3 0 5 C 0 2 1 	 
 
 8 F 1 8 B F D 8 	 
 
 0 0 8 F 0 0 1 A 	 
 
 1 5 E 0 0 0 0 2 	 
 
 0 0 0 0 0 0 0 0 	 
 
 0 0 0 7 0 0 0 D 	 
 
 2 4 0 1 F F F F 	 
 
 1 5 E 1 0 0 0 4 	 
 
 3 C 0 1 8 0 0 0 	 
 
 1 4 8 1 0 0 0 2 	 
 
 0 0 0 0 0 0 0 0 	 
 
 0 0 0 6 0 0 0 D 	 
 
 0 0 0 0 2 0 1 0 	 
 
 0 3 0 4 C 8 2 1 	 
 
 9 3 2 2 0 0 0 0 	 
 
 0 3 E 0 0 0 0 8 	 
 
 0 0 0 0 0 0 0 0 	 
 
 
 
 
 
 8 0 3 B B F 1 0 	 H a n a 	 f o l l o w s   o u t e r   t r a c k   o r d e r 
 
 8 0 3 B B F 4 4 	 K a n a 	 f o l l o w s   o u t e r   t r a c k   o r d e r 
 
 8 0 3 B B F 7 8 	 @ _ @ 
 
 8 0 3 B B F 9 8 	 n u m b e r s 
 
 8 0 3 B B F A 4 	 A S C I I 
 
 
 
 8 0 3 B B F C 4 	 A 
 
 8 0 3 B B F C 8 	 1 E 
 
 8 0 3 B B F C C 	 A 
 
 8 0 3 B B F D 0 	 1 E 
 
 8 0 3 B B F D 4 	 A 
 
 8 0 3 B B F D 8 	 p - > H a n a 
 
 8 0 3 B B F D C 	 p - > @ _ @ 
 
 8 0 3 B B F E 0 	 p - > K a n a 
 
 8 0 3 B B F E 4 	 p - > A S C I I 
 
 8 0 3 B B F E 8 	 p - > n u m b e r s 
 
 8 0 3 B B F E C 	 3 2 	 #   i n   H a n a 
 
 8 0 3 B B F F 0 	 1 E 	 #   i n   @ _ @ 
 
 8 0 3 B B F F 4 	 3 2 	 #   i n   K a n a 
 
 8 0 3 B B F F 8 	 1 E 	 #   i n   A S C I I 
 
 8 0 3 B B F F C 	 A 	 #   i n   n u m b e r s 
 
 
 
 8 0 3 B C 5 0 4 	 l a n g u a g e   s e l e c t e d 
 
 s e t   b y : 
 
 / / 8 0 3 B 9 2 B C : 	 + 7 6 C 
 
 S B 	 R 0 , 0 0 0 4   ( V 1 ) 
 
 S B 	 R 0 , 0 0 0 5   ( V 1 ) 
 
 S H 	 T 8 , 0 0 0 6   ( V 1 ) 
 
 m a y b e   t o : 
 
 2 4 1 9 0 3 0 0 	 A D D I U 	 T 9 , R 0 , 0 3 0 0 
 
 A 4 7 9 0 0 0 4 	 S H 	 T 9 , 0 0 0 4   ( V 1 ) 
 
 A 4 7 8 0 0 0 6 	 S H 	 T 8 , 0 0 0 6   ( V 1 ) 
 
 
 
 y e a h ,   i t s   c h e a p ,   b u t   i t   i s   e a s i e r   t h a n   T H I S ! 
 
 ( o h ,   d o   n e e d   t o   d i s a b l e   t h e   o u t e r   t r a c k ) 
 
 8 0 3 B B F D 8 	 8 0 3 B B F A 4 	 p - > A S C I I 
 
 8 0 3 B B F E 0 	 8 0 3 B B F 9 8 	 p - > n u m b e r s 
 
 8 0 3 B B F E 4 	 8 0 3 B B F 1 0 	 p - > H a n a 
 
 8 0 3 B B F E 8 	 8 0 3 B B F 4 4 	 p - > K a n a 
 
 8 0 3 B B F E C 	 1 E 	 #   i n   A S C I I 
 
 8 0 3 B B F F 4 	 A 	 #   i n   n u m b e r s 
 
 8 0 3 B B F F 8 	 3 2 	 #   i n   H a n a 
 
 8 0 3 B B F F C 	 3 2 	 #   i n   K a n a 
 
 
 
 s e t s   o r d e r   o f   e n t r i e s ! 
 
 8 0 3 B C 2 D C 	 0 C 0 0 1 4 4 0 	 H a n a 
 
 8 0 3 C C 2 E 0 	 0 C 0 0 1 5 A 0 	 @ _ @ 
 
 8 0 3 C C 2 E 4 	 0 C 0 0 1 4 9 8 	 K a n a 
 
 8 0 3 C C 2 E 8 	 0 C 0 0 1 4 F 0 	 A S C I I 
 
 8 0 3 C C 2 E C 	 0 C 0 0 1 5 4 8 	 n u m b e r s 
 
 
 
 / / 8 0 3 B 8 B 5 0 : 	 
 
 L B U 	 V 1 , 0 0 0 4   ( A 0 ) 
 
 L U I 	 T 7 , 8 0 3 C 
 
 L U I 	 T 8 , 8 0 3 C 
 
 B E Q 	 V 1 , R 0 , 8 0 3 B 8 B 7 0 
 
 N O P 
 
 A D D I U 	 A T , R 0 , 0 0 0 2 
 
 B N E 	 V 1 , A T , 8 0 3 B 8 B 9 8 
 
 A D D U 	 A 0 , A 1 , A 2 
 
 r e v i s e   f o r   A S C I I , # , @ _ @ , h a n a , k a n a 
 
 	 L B U 	 V 1 , 0 0 0 4   ( A 0 ) 
 
 	 L U I 	 T 7 , 8 0 3 C 
 
 	 L U I 	 T 8 , 8 0 3 C 
 
 	 N O P 
 
 	 N O P 
 
 2 4 6 1 F F F E 	 A D D I U 	 A T , V 1 , F F F E 
 
 1 8 2 0 0 0 0 B 	 B L E Z 	 A T , 8 0 3 B 8 B 9 8 
 
 	 A D D U 	 A 0 , A 1 , A 2 
 
 
 
 / / 8 0 3 B 9 0 2 4 : 	 t h i s   d o e s   t h e   d i a l s ,   o b v i o u s l y   ; * ) 
 
 L B U 	 V 0 , 0 0 0 4   ( A 1 ) 
 
 A D D I U 	 A T , R 0 , 0 0 0 2 
 
 B E Q L 	 V 0 , R 0 , 8 0 3 B 9 0 4 0 
 
 L H 	 T 6 , 0 0 0 6   ( A 1 ) 
 
 B N E L 	 V 0 , A T , 8 0 3 B 9 0 9 0 
 
 O R 	 V 0 , R 0 , R 0 
 
 / / 8 0 3 B 9 0 3 C : 	 r e d   d i a l   s e l e c t i o n   t h i n g y ! 
 
 L H 	 T 6 , 0 0 0 6   ( A 1 ) 
 
 r e v i s e   f o r   A S C I I , # , @ _ @ , h a n a , k a n a 
 
 	 L B U 	 V 0 , 0 0 0 4   ( A 1 ) 
 
 2 4 4 1 F F F E 	 A D D I U 	 A T , V 0 , F F F E 
 
 5 8 2 0 0 0 1 8 	 B L E Z L 	 A T , 8 0 3 B 9 0 9 0 
 
 0 0 0 0 1 0 2 5 	 O R 	 V 0 , R 0 , R 0 
 
 	 N O P 
 
 	 N O P 
 
 
 
 / / 8 0 3 B 9 0 C 0 : 	 l e t t e r s   o n   f a c e 
 
 B E Q 	 V 0 , R 0 , 8 0 3 B 9 0 D 0 
 
 A D D I U 	 A T , R 0 , 0 0 0 2 
 
 B N E L 	 V 0 , A T , 8 0 3 B 9 0 E C 
 
 L H 	 V 0 , 0 0 0 6   ( A 0 ) 
 
 L H 	 T 6 , 0 0 0 6   ( A 0 ) 
 
 r e v i s e   f o r   A S C I I , # , @ _ @ , h a n a , k a n a 
 
 2 4 4 1 F F F E 	 A D D I U 	 A T , V 0 , F F F E 
 
 5 8 2 0 0 0 0 9 	 B L E Z L 	 A T , 8 0 3 B 9 0 E C 
 
 8 4 8 2 0 0 0 6 	 L H 	 V 0 , 0 0 0 6   ( A 0 ) 
 
 	 N O P 
 
 
 
 / / 8 0 3 B A B 0 8 : 	 D L   m a n i p u l a t i o n 
 
 L W 	 T 1 , 0 1 3 C   ( S P ) 
 
 L U I 	 T 0 , E 7 0 0 
 
 B E Q 	 T 1 , R 0 , 8 0 3 B A B 1 C 
 
 A D D I U 	 A T , R 0 , 0 0 0 2 
 
 B N E 	 T 1 , A T , 8 0 3 B A B D C 
 
 O R 	 V 0 , A 2 , R 0 
 
 r e v i s e   f o r   A S C I I , # , @ _ @ , h a n a , k a n a 
 
 	 L W 	 T 1 , 0 1 3 C   ( S P ) 
 
 	 L U I 	 T 0 , E 7 0 0 
 
 2 5 2 1 F F F E 	 A D D I U 	 A T , T 1 , F F F E 
 
 1 8 2 0 0 0 3 1 	 B L E Z 	 A T , 8 0 3 B A B D C 
 
 0 0 C 0 1 0 2 5 	 O R 	 V 0 , A 2 , R 0 
 
 	 N O P 
 
 
 
 
 
 
 
 
 
 - - - - - - - 
 
 
 
 a l l   t h e   s a v e   d i a l o g s   a r e   W r O n G ! 	 [ m e n u   0 1 A E   0 1 A F ] 
 
 2 B 0 9 	 - > 2 B 0 A   +   2 B 0 B 
 
 2 B 0 C 	 - > 2 B 0 D   +   2 B 0 E 
 
 2 B 0 F 	 - > 2 B 1 0   +   2 B 1 1 
 
 2 B 1 2 	 - > 2 B 1 3   +   2 B 1 4 
 
 2 B 1 5 	 - > 2 B 1 6   +   2 B 1 7 
 
 2 B 1 8 	 - > 2 B 1 9   +   2 B 1 A 
 
 
 
 s e t   v i a   l i s t s :   C - 8 5 D B 0 0 	 0 0 9 6 C 3 A 0   0 0 9 6 C C 0 0 	 p c v - > 8 0 A A C 2 3 0 
 
 0 x 8 3 C 	 8 0 2 7 4 5 E C 	 0 0 0 0 2 B 0 9 
 
 0 x 8 4 0 	 8 0 2 7 4 5 F 0 	 0 0 0 0 2 B 0 C 
 
 0 x 8 4 4 	 8 0 2 7 4 5 F 4 	 0 0 0 0 2 B 0 F 
 
 0 x 8 4 8 	 8 0 2 7 4 5 F 8 	 0 0 0 0 2 B 1 2 
 
 0 x 8 4 C 	 8 0 2 7 4 5 F C 	 0 0 0 0 2 B 1 5 
 
 0 x 8 5 0 	 8 0 2 7 4 6 0 0 	 0 0 0 0 2 B 1 8 
 
 
 
 l o a d   t e x t I D   t o : 
 
 8 0 1 3 9 F 4 0 	 
 
 8 0 1 4 1 F F 4 	 c u r r e n t l y - d i s p l a y e d   t e x t   ( h e a d e r   f o r   m s g t x t ) 
 
 8 0 1 4 2 6 F 4 	 
 
 
 
 o k a y ,   t h i s   i s   s t u p i d .     J u s t   h a c k   t h e   t e x t ! 
 
 
 
 + - + - + - + - + 
 
 A b o u t   m a i l   a n d   m e s s a g e   b o a r d   m e s s a g e s : 
 
 T h e y ' r e   b r o k e n . 
 
 m a i l   a t :   8 0 0 0 4 9 4 8 
 
 c u r r e n t l y   r e a d i n g :   8 0 3 C B 7 8 8 
 
 
 
     T h e   p h y s i c a l   l i m i t   o n   t e x t   f o r   t h e   m e s s a g e   i t s e l f   i s   0 x 6 8 .     
 
     T h a t ' s   t e s t e d   a t   8 0 0 9 3 9 5 4 : 	 m a i l 
 
 S L T I 	 A T , V 1 , 0 0 6 9 
 
 B E Q 	 A T , R 0 , 8 0 0 9 3 9 8 0 
 
 L W 	 T 2 , 0 0 4 C   ( S P ) 
 
 
 
     L i k e   a l l   t e x t   b a n k s ,   i t   w i l l   f a i l   t o   l o a d   i f   t h e   t e x t   e x c e e d s   t h i s   t o t a l 
 
     U n t i l   a   b e t t e r   w o r k a r o u n d   c a n   b e   m a d e   ( a k a   a   h u g e   f r e a k i n g   b u f f e r   o r   v a r i a b l e   s i z e )   I ' l l   j u s t   f o r c e   m e s s a g e s   t o   d i m i n i s h   i n   s i z e 
 
 ! T E M P O R A R Y   W O R K A R O U N D ! 	 8 0 0 9 3 9 5 4 	 m a i l 
 
 2 8 6 1 0 0 6 9 	 S L T I 	 A T , V 1 , 0 0 6 9 
 
 5 0 2 0 0 0 0 1 	 * B E Q L 	 A T , R 0 , + 1 
 
 2 4 0 3 0 0 6 8 	 * A D D I U 	 V 1 , R 0 , 0 0 6 8 
 
 
 
 8 0 0 B 3 3 9 8 : 
 
 B E Q L 	 V 0 , R 0 , 8 0 0 B 3 3 A 0 
 
 L W 	 R A , 0 0 1 4   ( S P ) 
 
 S L T I 	 V 0 , V 1 , 0 0 6 9 
 
 L W 	 R A , 0 0 1 4   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 1 8 
 
 J R 	 R A 
 
 N O P 
 
 
 
 8 0 0 B 5 A F 4 : 
 
 S L T I 	 A 1 , A 0 , 0 0 6 9 
 
 B E Q L 	 A 1 , R 0 , 8 0 0 B 5 B 0 C 
 
 O R 	 V 0 , R 0 , R 0 
 
 B E Q 	 R 0 , R 0 , 8 0 0 B 5 B 0 C 
 
 L W 	 V 0 , C 5 3 8   ( V 0 ) 
 
 
 
 = _ = 
 
 
 
 H e y !     G u e s s   w h a t ?     . . . t h e   G y r o i d   m e s s a g e   c u r s o r   u s e s   a   + d i f f e r e n t +   c o d e b a s e   t h a n   t h e   o t h e r   m e s s a g e   c u r s o r .     J o y ! 
 
 
 
 = _ = 
 
 
 
 E m p t y   c h a r a c t e r   s l o t 
 
 C - 7 C 8 B 4 0 + 0 x C 3 0 
 
 L U I 	 A 1 , 8 0 9 C 
 
 A D D I U 	 A 1 , A 1 , 0 C 3 8 	 ; A 1 = p - > t e x t   s t r i n g 
 
 S W 	 A 0 , 0 0 3 C   ( S P ) 
 
 J A L 	 8 0 0 9 9 8 C 0 
 
 A D D I U 	 A 2 , R 0 , 0 0 0 4 	 ; A 2 = s t r l e n 
 
 
 
 0 x 2 5 1 8 	 s t r i n g 
 
 
 
 s t r i n g   i t s e l f   m e a n s   s o e m t h i n g   l i k e   v a c a n t ,   b u t   i n   t h i s   c a s e ,   N e w   a s   i n   n e w   f i l e   w o u l d   b e   m o r e   f i t t i n g 
 
 
 
 = _ = 
 
 
 
 o f f s e t s   t o   s e l e c t i o n   t e x t 
 
 0 x 9 D 6 0 	 A r e   y o u 
 
 t e x t : 	 	 8 D F 4 	 2 4 A 5 9 0 7 0 	 - > 	 9 0 6 D 
 
 s t r l e n : 	 8 D F 8 	 2 4 0 6 0 0 0 4 	 - > 	 7 
 
 
 
 0 x 9 D 6 4 	 c e r t a i n ? 
 
 t e x t : 	 	 8 E 5 8 	 2 4 A 5 9 0 7 4 	 - > 	 
 
 s t r l e n : 	 8 E 6 0 	 2 4 0 6 0 0 0 6 	 - > 	 8 
 
 
 
 = _ = 
 
 
 
 8 0 1 4 2 6 D 4   i s   n e x t - l o a d e d   t e x t 
 
 d e t e r m i n e   t h e   m a i l   r e t u r n   t e x t s 
 
 P e l l y : 
 
 g r e e t i n g s 	 8 0 2 7 2 D 3 0 
 
 0 8 A D 	 g r e e t i n g   -   m a i l b a g   f u l l 
 
 0 8 B 1 	 g r e e t i n g 
 
 0 8 C F 	 g r e e t i n g   -   n o   l o a n ,   m a i l b a g   f u l l 
 
 0 8 D 1 	 g r e e t i n g   -   n o   l o a n 
 
 0 8 A F 	 m a i l b a g   f u l l 
 
 
 
 0 8 B 5 	 s e n d   a   l e t t e r 
 
 0 8 B 9 	 s e n t 
 
 0 8 B B 	 s p e c i a l   d e l i v e r y   ( s l o g a n ) 
 
 0 8 B D 	 a n y   m o r e   t o   s e n d ? 
 
 0 8 E 3 	 n o t   m a i l i n g   m e n u 
 
 0 8 E 1 	 
 
 1 B D 7 	 
 
 
 
 0 8 D 3 	 r e p a y   l o a n 
 
 0 8 D 5 	 a m o u n t   r e m a i n i n g 
 
 0 8 D 7 	 p a i d   o f f 
 
 0 8 E 5 	 r e t u r n   w / o   p a y m e n t 
 
 
 
 1 B E 7 	 n o r m a l   s a v e   a   l e t t e r 
 
 0 8 E 9 	 r e t u r n   f r o m   s a v e   a   l e t t e r 
 
 
 
 0 8 D 9 	 a n y t h i n g   e l s e ?   -   m a i l b a g   f u l l 
 
 0 8 D B 	 a n y t h i n g   e l s e ? 
 
 0 8 D D 	 a n y t h i n g   e l s e ?   -   n o   l o a n ,   m a i l b a g   f u l l 
 
 0 8 D F 	 a n y t h i n g   e l s e ?   -   n o   l o a n 
 
 0 8 B 3 	 n o r m a l   e n d 
 
 
 
 0 0 7 D 	 
 
 
 
 1 B D B 	 ! ! ! 
 
 	 1 B D D 	 y e s 	 a p p e a r s   t o   s a v e   g a m e ! 
 
 	 1 B D F 	 n e v e r   m i n d 
 
 0 8 E 7 	 t e x t . . . 	 p r o b a b l y   c o r r u p t   o r   u n r e a d a b l e 
 
 1 B D 3 	 c a n ' t   a c c e p t   l e t t e r s   f r o m   t r a v e l l e r s 
 
 0 8 E B 	 m e n u :   1 B E 7 ,   0 8 E D 
 
 	 1 B E 7 	 p r e t e x t   t o   s a v i n g   l e t t e r s 
 
 	 0 8 E D 	 t e x t . . . 
 
 1 B D 9 	 ! ! ! 
 
 	 0 8 E 9 	 y e s 
 
 	 0 8 E D 	 n e v e r   m i n d 
 
 
 
 0 0 1 9 	 ! ! ! 
 
 0 0 1 6 	 ! ! ! 
 
 0 0 1 4 	 ! ! ! 
 
 
 
 0 0 1 2 	 ! ! ! 	 d o e s   t h i s   a s k   t h e   q u a l i t y   o f   t h e   s e r v i c e ? 
 
 	 0 0 0 D 	 h a p p y ! 	 
 
 	 0 0 0 E 	 s l e e p y 	 
 
 	 0 0 0 9 	 n e x t ! 	 
 
 	 	 0 0 0 A 	 a b o u t   a v e r a g e 	 
 
 	 	 0 0 0 B 	 m a d 
 
 	 	 0 0 0 C 	 d i s a p p o i n t i n g 
 
 	 	 0 0 1 2 	 n e x t ! 
 
 	 o p t i o n s   r e d i r e c t   t o   0 0 0 3 ,   t h e n   0 0 0 2 
 
 	 	 F F F F 	 e n d 
 
 	 	 0 0 0 4 	 c o n t i n u e 
 
 0 0 1 9 	 ! ! ! 
 
 0 0 1 6 	 ! ! ! 
 
 0 0 1 5 	 ! ! ! 
 
 
 
 
 
 P h y l i s : 
 
 0 8 A E 	 g r e e t i n g   -   m a i l b a g   f u l l 
 
 0 8 B 2 	 g r e e t i n g 
 
 0 8 D 0 	 g r e e t i n g   -   n o   l o a n ,   m a i l b a g   f u l l 
 
 0 8 D 2 	 g r e e t i n g   -   n o   l o a n 
 
 0 8 B 0 	 m a i l b a g   f u l l 
 
 
 
 0 8 B 6 	 s e n d   a   l e t t e r 
 
 0 8 B A 	 s e n t 
 
 0 8 B C 	 s p e c i a l   d e l i v e r y 
 
 0 8 B E 	 a n y   m o r e   t o   s e n d ? 
 
 0 8 E 4 	 n o t   m a i l i n g   m e n u 
 
 0 8 E 2 	 
 
 1 B D 8 	 
 
 
 
 0 8 D 4 	 r e p a y   l o a n 
 
 0 8 D 6 	 a m o u n t   r e m a i n i n g 
 
 0 8 D 8 	 p a i d   o f f 
 
 0 8 E 6 	 r e t u r n   w / o   p a y m e n t 
 
 
 
 1 B E 8 	 n o r m a l   s a v e   a   l e t t e r 
 
 1 B D A 	 ! ! ! 
 
 	 0 8 E A 	 y e s 
 
 	 0 8 E E 	 n e v e r   m i n d 
 
 1 B D C 	 ! ! ! 
 
 	 1 B D E 	 y e s 	 a p p e a r s   t o   s a v e   g a m e ! 
 
 	 1 B E 0 	 n e v e r   m i n d 
 
 
 
 
 
 0 8 D A 	 a n y t h i n g   e l s e ?   -   m a i l b a g   f u l l 
 
 0 8 D C 	 a n y t h i n g   e l s e ? 
 
 0 8 D E 	 a n y t h i n g   e l s e ?   -   n o   l o a n ,   m a i l b a g   f u l l 
 
 0 8 E 0 	 a n y t h i n g   e l s e ?   -   n o   l o a n 
 
 0 8 B 4 	 n o r m a l   e n d 
 
 
 
 + - + - + 
 
 
 
 T r a i n : 
 
 0 9 4 3 	 g r e e t i n g 
 
 	 0 9 4 A 	 y e s 
 
 	 + 0 9 4 B 	 p r e p a r e   f o r   d e p a r t u r e 
 
 	 + 0 9 4 F 	 c o p y i n g   d a t a 
 
 	 0 9 4 4 	 n o 
 
 
 
 0 9 4 8 	 n o t   e n o u g h   s p a c e 
 
 	 0 9 4 D 	 y e s 
 
 	 0 9 4 C 	 n o 
 
 	 
 
 0 9 5 E 	 N o   M e m P a k   p r e s e n t 
 
 
 
 + - + - + 
 
 
 
 c a t a l o g   s c r e e n   s i d e   c o l u m n   o n m o u s e o v e r   n a m e s 
 
 r e l o c a t e d   t o   8 B 5 A 	 - 	 0 x 5 A 
 
 
 
 t e m p o r a r y   f i x   f o r   p o s t s c r i p t   r u n o v e r   -   
 
 	 c o p y   l e n g t h   f i x e d   a t   0 x 1 0   ( m o r e   d o e s n ' t   g e t   c o p i e d   a n y w a y ) 
 
 	 r e q u i r e s   a   s i e   r e d u c t i o n   i n   t h e   c o p y   h a l f   o f   p o s t s c r i p t   r e t r i e v a l   s e r v i c e 
 
 	 8 0 0 9 3 D 2 8   a n d   d o w n . . .   A 1   ( S P + 7 8 )   =   s t r l e n 
 
 	 
 
 	 c o u l d   d o   8 0 0 9 3 D 5 8   B G T Z L ,   s o   o n l y   w r i t e s   i f   V 0   ( c o u n t d o w n - > 0 ) 
 
 	 t h e n   h i j a c k   8 0 0 9 3 D 3 C   -   i f   y o u   c a n   g e t   a   ' A 1 ! > 1 0 '   i n   t h e r e 
 
 	 c o u l d   r e w r i t e   l o o p   i n t o   d e c r e m e n t a l   c o u n t . . . 
 
 	 w a i t !   d o e s   S 0   a l w a y s   =   1 0 ? 
 
 	 
 
 T r y . . . 
 
 8 0 0 9 3 D 3 8 : 	 P R E P A R E   S L O T 	 
 
 N O T E :   t h i s   i s   i n t e n t i o n a l l y   w r i t t e n   u n o p t i m i z e d   t o   k e e p   f r o m   h a v i n g   t o   r e c o m p u t e   a l l   t h e   b r a n c h e s 
 
 	 I t   i s   d e s i g n e d   a s   a   t e m p o r a r y   m e a s u r e   u n t i l   t h e   w h o l e   r e c a l l   s c h e m e   i s   r e v i s e d 
 
 O R 	 V 0 , R 0 , R 0 	 2 4 0 2 F F F F 	 A D D I U 	 V 0 , R 0 , F F F F 
 
 B L E Z 	 A 1 , 8 0 0 9 3 D 6 0 	 1 8 A 0 0 0 0 B 	 B L E Z 	 A 1 , + B 
 
 A D D U 	 A 0 , T 9 , T 2 	 0 3 2 A 2 0 2 1 	 A D D U 	 A 0 , T 9 , T 2 
 
 L B U 	 T 4 , 0 0 0 0   ( A 0 ) 	 0 0 B 0 0 8 2 A 	 S L T 	 A T , A 1 , S 0 
 
 A D D I U 	 V 0 , V 0 , 0 0 0 1 	 5 0 2 0 0 0 0 1 	 B E Q L 	 A T , R 0 , + 1 
 
 S L T 	 A T , V 0 , A 1 	 0 2 0 0 2 8 2 5 	 O R 	 A 1 , S 0 , R 0 
 
 A D D I U 	 V 1 , V 1 , 0 0 0 1 	 9 0 8 C 0 0 0 0 	 L B U 	 T 4 , 0 0 0 0   ( A 0 ) 
 
 A D D I U 	 A 0 , A 0 , 0 0 0 1 	 2 4 8 4 0 0 0 1 	 A D D I U 	 A 0 , A 0 , 0 0 0 1 
 
 / / 8 0 0 9 3 D 5 8 
 
 B N E Z 	 A T , 8 0 0 9 3 D 4 4 	 2 4 4 2 0 0 0 1 	 A D D I U 	 V 0 , V 0 , 0 0 0 1 
 
 S B 	 T 4 , F F F F   ( V 1 ) 	 0 0 4 3 0 8 2 1 	 A D D U 	 A T , V 0 , V 1 
 
 S L T 	 A T , V 0 , S 0 	 1 4 4 5 F F F B 	 B N E 	 V 0 , A 1 , - 5 
 
 B E Q 	 A T , R 0 , 8 0 0 9 3 D 8 4 	 A 0 2 C F F F F 	 S B 	 T 4 , F F F F   ( A T ) 
 
 O R 	 A 1 , S 0 , R 0 	 1 0 5 0 0 0 0 6 	 B E Q 	 V 0 , S 0 , + 6 
 
 / / 8 0 0 9 3 D 6 C 
 
 A D D I U 	 A 0 , R 0 , 0 0 2 0 	 0 2 0 0 2 8 2 5 	 O R 	 A 1 , S 0 , R 0 
 
 A D D I U 	 V 0 , V 0 , 0 0 0 1 	 2 4 0 C 0 0 2 0 	 A D D I U 	 T 4 , R 0 , 0 0 2 0 
 
 S L T 	 A T , V 0 , S 0 	 2 4 4 2 0 0 0 1 	 A D D I U 	 V 0 , V 0 , 0 0 0 1 
 
 S B 	 A 0 , 0 0 0 0   ( V 1 ) 	 0 0 4 3 0 8 2 1 	 A D D U 	 A T , V 0 , V 1 
 
 B N E Z 	 A T , 8 0 0 9 3 D 7 0 	 1 4 4 5 F F F D 	 B N E 	 V 0 , A 1 , - 3 
 
 A D D I U 	 V 1 , V 1 , 0 0 0 1 	 A 0 2 C F F F F 	 S B 	 T 4 , F F F F   ( A T ) 
 
 / / 8 0 0 9 3 D 8 4 : 
 
 
 
 m e s s a g e s   a r e   a   p r o b l e m . . . 
 
 m a y b e   c a n   t a k e   c u r r e n t   m e s s a g e   a n d   d i s p l a y   i t   f r o m   a   b u f f e r   e l s e w h e r e 
 
 U s e   t h r e e   n e w   7 F   c o m m a n d s   ( o r   s i m i l i a r )   t o   a c t   a s   p u r e   r o m   u p l o a d 
 
 S o ,   a   p o s t s c r i p t   m i g h t   j u s t   r e c a l l   a   l i n e   o f   t e x t   3 2   c h a r a c t e r s   l o n g 
 
 	 b u t   i t s e l f   o n l y   b e   a s   l o n g   a s   t h e   7 F   t o   r e c a l l   i t 
 
 
 
 + _ + 
 
 
 
 S n o w m a n   f r e e z e   b u g   i s   b a s e d   o n   g e n e r a l   m a i l   m e s s a g e   f r e e z e   b u g . 
 
 B a s i c a l l y ,   a l l   7 F   c o m m a n d s   b e s i d e s   s l o t   i n s e r t   f a i l . 
 
 S i m p l e s t   s o l u t i o n   w o u l d   b e   t o   s i m p l y   o m i t   a l l   t h e   o t h e r   c o m m a n d s .     H o w e v e r ,   I ' m   n o t   a   s i m p l e   g u y . 
 
 
 
 A d d   a n   a l t e r n a t e   r e t u r n :   V 1 = o f f s e t   t o   t e x t 
 
 8 0 0 9 3 4 1 C 	 4 1 9 9 C 	 
 
 A D D I U 	 S P , S P , F F E 0 
 
 S W 	 R A , 0 0 1 C   ( S P ) 
 
 A D D U 	 T 6 , A 2 , A 0 	 ; T 6 = A 2 + A 0 :   p - > c u r . t e x t . p o s . 
 
 L B U 	 V 0 , 0 0 0 1   ( T 6 ) 	 ; V 0 = t e x t + 1 :   c o m m a n d   I D 
 
 B L T Z 	 V 0 , 8 0 0 9 3 4 6 4 	 ; b r a n c h   i f   i n v a l i d   ( n e g a t i v e ) 
 
 S L T I 	 A T , V 0 , 0 0 6 1 	 ; T R U E   i f   I D   0 - 6 1 ,   w h i c h   w e r e   n o r m a l ,   s t o c k   c o m m a n d s 
 
 B E Q 	 A T , R 0 , 8 0 0 9 3 4 6 4 	 ; b r a n c h   i f   n o t   o n e   o f   t h e s e 
 
 S L L 	 T 7 , V 0 , 0 x 2 	 ; T 7 = c o m m a n d - > o f f s e t 
 
 L U I 	 V 1 , 8 0 1 0 
 
 A D D U 	 V 1 , V 1 , T 7 
 
 L W 	 V 1 , 7 0 2 0   ( V 1 ) 	 ; V 1 = 8 0 1 0 7 0 2 0 + o f f s e t :   p - > e x p a n s i o n   h a n d l e r   w h e n   a p p l i c a b l e 
 
 L W 	 T 8 , 0 0 3 0   ( S P ) 
 
 B E Q L 	 V 1 , R 0 , 8 0 0 9 3 4 6 8 	 ; b r a n c h   i f   n o t   a   h a n d l e d   i n s e r t   t y p e 
 
 O R 	 V 0 , A 3 , R 0 
 
 J A L R 	 R A , V 1 	 	 ; i n s e r t ! 
 
 S W 	 T 8 , 0 0 1 0   ( S P ) 	 ; S P + 1 0 = T 8 :   ? ? ? 
 
 B E Q 	 R 0 , R 0 , 8 0 0 9 3 4 6 C 
 
 L W 	 R A , 0 0 1 C   ( S P ) 
 
 / / 8 0 0 9 3 4 6 4 : 	 d e f a u l t   t o   g i v e n   s a m p l e 
 
 O R 	 V 0 , A 3 , R 0 	 ; V 0 = A 3 :   d e f a u l t   r e t u r n 
 
 / / 8 0 0 9 3 4 6 8 : 	 r e t u r n 
 
 L W 	 R A , 0 0 1 C   ( S P ) 
 
 A D D I U 	 S P , S P , 0 0 2 0 
 
 J R 	 R A 
 
 N O P 
 
 
 
 h a c k e d ! 
 
 8 0 0 9 3 4 1 C 	 4 1 9 9 C 	 
 
 2 7 B D F F D 8 	 * A D D I U 	 S P , S P , F F D 8 
 
 A F B F 0 0 1 C 	 S W 	 R A , 0 0 1 C   ( S P ) 
 
 0 0 C 4 7 0 2 1 	 A D D U 	 T 6 , A 2 , A 0 	 ; T 6 = A 2 + A 0 :   p - > c u r . t e x t . p o s . 
 
 9 1 C 2 0 0 0 1 	 L B U 	 V 0 , 0 0 0 1   ( T 6 ) 	 ; V 0 = t e x t + 1 :   c o m m a n d   I D 
 
 2 C 4 1 0 0 6 1 	 * S L T I U 	 A T , V 0 , 0 0 6 1 	 ; r e m o v e s   n e e d   f o r   <   0   t e s t 
 
 1 0 2 0 0 0 0 9 	 B E Q 	 A T , R 0 , 8 0 0 9 3 4 6 4 
 
 0 0 0 2 7 8 8 0 	 S L L 	 T 7 , V 0 , 0 x 2 
 
 3 C 0 3 8 0 1 0 	 L U I 	 V 1 , 8 0 1 0 
 
 0 0 6 F 1 8 2 1 	 A D D U 	 V 1 , V 1 , T 7 
 
 8 C 6 3 7 0 2 0 	 L W 	 V 1 , 7 0 2 0   ( V 1 ) 
 
 1 0 6 0 0 0 0 4 	 * B E Q 	 V 1 , R 0 , 8 0 0 9 3 4 6 4 
 
 8 F B 8 0 0 3 0 	 L W 	 T 8 , 0 0 3 0   ( S P ) 
 
 0 0 6 0 F 8 0 9 	 J A L R 	 R A , V 1 
 
 A F B 8 0 0 1 0 	 S W 	 T 8 , 0 0 1 0   ( S P ) 
 
 0 0 0 2 3 8 2 5 	 * O R 	 A 3 , V 0 , R 0 	 ; A 3 = s i z e 
 
 / / 8 0 0 9 3 4 6 4 : 
 
 A F A 7 0 0 2 0 	 * S W 	 A 3 , 0 0 2 0   ( S P ) 	 ; s a v e   p o s i t i o n 
 
 0 C 0 2 4 0 D 3 	 * J A L 	 8 0 0 9 0 3 4 C 	 ; g e t   c o m m a n d   s i z e 
 
 0 0 0 E 2 0 2 5 	 * O R 	 A 0 , T 6 , R 0 
 
 0 0 0 2 1 8 2 5 	 * O R 	 V 1 , V 0 , R 0 	 ; V 1 = c o m m a n d   s i z e ,   f o r   o f f s e t t i n g 
 
 8 F A 2 0 0 2 0 	 * L W 	 V 0 , 0 0 2 0   ( S P ) 
 
 / / 8 0 0 9 3 4 6 8 : 
 
 8 F B F 0 0 1 C 	 L W 	 R A , 0 0 1 C   ( S P ) 
 
 0 3 E 0 0 0 0 8 	 J R 	 R A 
 
 2 7 B D 0 0 2 8 	 * A D D I U 	 S P , S P , 0 0 2 8 
 
 
 
 u s e d   h e r e : 
 
 / / 8 0 0 9 3 4 B C : 
 
 	 L B U 	 V 0 , 0 0 0 0   ( S 2 ) 
 
 	 O R 	 A 0 , S 4 , R 0 	 ; A 0 = S 4 :   p - > t e x t 
 
 	 O R 	 A 1 , S 5 , R 0 	 ; A 1 = S 5 :   m a x   s i z e ? 
 
 	 B N E 	 S 3 , V 0 , 8 0 0 9 3 4 E 4 	 ; b r a n c h   i f   n o t   a   7 F   c o m m a n d 
 
 	 O R 	 A 2 , S 0 , R 0 	 ; A 2 = S 0 :   c u r . p o s 
 
 	 O R 	 A 3 , S 1 , R 0 	 ; A 3 = S 1 :   d e f a u l t   r e t u r n = e n d p o i n t 
 
 	 J A L 	 8 0 0 9 3 4 1 C 	 ; V 0 = s i z e   o f   f i l e ;   i n j e c t s   7 F   s l o t   c o m m a n d s 
 
 	 S W 	 S 6 , 0 0 1 0   ( S P ) 	 ; S P + 1 0 = S 6 :   ? ? ? 
 
 	 B E Q 	 R 0 , R 0 , 8 0 0 9 3 4 E C 
 
 	 O R 	 S 1 , V 0 , R 0 	 ; S 1 = V 0 :   e n d p o i n t = n e w   s i z e 
 
 / / 8 0 0 9 3 4 E 4 : 
 
 	 A D D I U 	 S 0 , S 0 , 0 0 0 1 	 ; S 0 + + 	 c o u n t + + 
 
 	 A D D I U 	 S 2 , S 2 , 0 0 0 1 	 ; S 2 + + 	 s o u r c e + + 
 
 	 S L T 	 A T , S 0 , S 1 	 ; T R U E   i f   c o u n t e d   p a s t   e n d 
 
 	 B N E L 	 A T , R 0 , 8 0 0 9 3 4 C 0 
 
 	 L B U 	 V 0 , 0 0 0 0   ( S 2 ) 	 ; V 0 = n e x t   b y t e   f r o m   s o u r c e 
 
 / / 8 0 0 9 3 4 F 8 : 
 
 
 
 i n s e r t   t h e s e   a n d   a d d   t h e   r e s u l t   t o   
 
 0 C 0 2 4 0 D 3 	 J A L 	 8 0 0 9 0 3 4 C 	 ; g e t   c o m m a n d   s i z e 
 
 0 0 1 2 2 0 2 5 	 O R 	 A 0 , S 2 , R 0 
 
 
 
 h a c k e d ! 
 
 / / 8 0 0 9 3 4 B C : 	 4 1 A 3 C 
 
 	 L B U 	 V 0 , 0 0 0 0   ( S 2 ) 
 
 	 O R 	 A 0 , S 4 , R 0 	 ; A 0 = S 4 :   p - > t e x t 
 
 	 O R 	 A 1 , S 5 , R 0 	 ; A 1 = S 5 :   m a x   s i z e ? 
 
 	 B N E 	 S 3 , V 0 , 8 0 0 9 3 4 E 4 	 ; b r a n c h   i f   n o t   a   7 F   c o m m a n d 
 
 	 O R 	 A 2 , S 0 , R 0 	 ; A 2 = S 0 :   c u r . p o s 
 
 	 O R 	 A 3 , S 1 , R 0 	 ; A 3 = S 1 :   d e f a u l t   r e t u r n = e n d p o i n t 
 
 	 J A L 	 8 0 0 9 3 4 1 C 	 ; V 0 = s i z e   o f   f i l e ;   i n j e c t s   7 F   s l o t   c o m m a n d s 
 
 	 S W 	 S 6 , 0 0 1 0   ( S P ) 	 ; S P + 1 0 = S 6 :   ? ? ? 
 
 0 0 7 0 8 0 2 1 	 * A D D U 	 S 0 , S 0 , V 1 
 
 1 0 0 0 0 0 0 2 	 * B E Q 	 R 0 , R 0 , 8 0 0 9 3 4 E 8 
 
 	 O R 	 S 1 , V 0 , R 0 	 ; S 1 = V 0 :   e n d p o i n t = n e w   s i z e 
 
 / / 8 0 0 9 3 4 E 4 : 
 
 	 A D D I U 	 S 0 , S 0 , 0 0 0 1 	 ; S 0 + + 	 c o u n t + + 
 
 	 S L T 	 A T , S 0 , S 1 	 ; T R U E   i f   c o u n t e d   p a s t   e n d 
 
 1 4 2 0 F F F 2 	 * B N E 	 A T , R 0 , 8 0 0 9 3 4 B C 
 
 0 2 1 4 9 0 2 1 	 * A D D U 	 S 2 , S 0 , S 4 
 
 / / 8 0 0 9 3 4 F 8 : 
 
 
 
 
 
 / / 8 0 0 9 3 5 7 0 : 
 
 L B U 	 V 0 , 0 0 0 0   ( S 2 ) 
 
 O R 	 S 3 , S 1 , R 0 
 
 O R 	 A 0 , S 5 , R 0 
 
 B N E 	 S 8 , V 0 , 8 0 0 9 3 5 B 4 	 ; b r a n c h   i f   n o t   a   7 F   c o m m a n d 
 
 O R 	 A 1 , S 6 , R 0 
 
 O R 	 A 2 , S 0 , R 0 
 
 O R 	 A 3 , S 1 , R 0 
 
 J A L 	 8 0 0 9 3 4 1 C 
 
 S W 	 S 7 , 0 0 1 0   ( S P ) 
 
 L W 	 V 1 , 0 0 0 0   ( S 4 ) 
 
 O R 	 S 1 , V 0 , R 0 
 
 S L T 	 A T , S 0 , V 1 
 
 B E Q 	 A T , R 0 , 8 0 0 9 3 5 B C 
 
 A D D U 	 T 6 , V 1 , V 0 
 
 S U B U 	 T 7 , T 6 , S 3 
 
 B E Q 	 R 0 , R 0 , 8 0 0 9 3 5 B C 
 
 S W 	 T 7 , 0 0 0 0   ( S 4 ) 
 
 / / 8 0 0 9 3 5 B 4 : 
 
 A D D I U 	 S 0 , S 0 , 0 0 0 1 
 
 A D D I U 	 S 2 , S 2 , 0 0 0 1 
 
 / / 8 0 0 9 3 5 B C : 
 
 S L T 	 A T , S 0 , S 1 
 
 B N E L 	 A T , R 0 , 8 0 0 9 3 5 7 4 
 
 L B U 	 V 0 , 0 0 0 0   ( S 2 ) 
 
 / / 8 0 0 9 3 5 C 8 : 
 
 
 
 H A C K E D ! 
 
 / / 8 0 0 9 3 5 7 0 : 	 4 1 A F 0 
 
 	 L B U 	 V 0 , 0 0 0 0   ( S 2 ) 
 
 	 O R 	 S 3 , S 1 , R 0 
 
 	 O R 	 A 0 , S 5 , R 0 
 
 1 7 C 2 0 0 	 * B N E 	 S 8 , V 0 , 8 0 0 9 3 5 B 4 	 ; b r a n c h   i f   n o t   a   7 F   c o m m a n d 
 
 	 O R 	 A 1 , S 6 , R 0 
 
 	 O R 	 A 2 , S 0 , R 0 
 
 	 O R 	 A 3 , S 1 , R 0 
 
 	 J A L 	 8 0 0 9 3 4 1 C 
 
 	 S W 	 S 7 , 0 0 1 0   ( S P ) 
 
 0 0 7 0 8 0 2 1 	 * A D D U 	 S 0 , S 0 , V 1 
 
 	 L W 	 V 1 , 0 0 0 0   ( S 4 ) 
 
 	 O R 	 S 1 , V 0 , R 0 
 
 	 S L T 	 A T , S 0 , V 1 
 
 1 0 2 0 0 0 	 * B E Q 	 A T , R 0 , 8 0 0 9 3 5 B C 
 
 	 A D D U 	 T 6 , V 1 , V 0 
 
 	 S U B U 	 T 7 , T 6 , S 3 
 
 1 0 0 0 0 0 	 * B E Q 	 R 0 , R 0 , 8 0 0 9 3 5 B C 
 
 	 S W 	 T 7 , 0 0 0 0   ( S 4 ) 
 
 / / 8 0 0 9 3 5 B 4 : 
 
 	 A D D I U 	 S 0 , S 0 , 0 0 0 1 
 
 / / 8 0 0 9 3 5 B C : 
 
 	 S L T 	 A T , S 0 , S 1 
 
 1 4 2 0 	 * B N E 	 A T , R 0 , 8 0 0 9 3 5 7 0 
 
 0 2 1 5 9 0 2 1 	 * A D D U 	 S 2 , S 0 , S 5 
 
 / / 8 0 0 9 3 5 C 8 : 
 
 
 
 F i x e d   t h e   s n o w m a n   b u g   a t   l e a s t .     H e r e ' s   h o p i n g   e v e r y t h i n g   e l s e   i s   o k a y   t o o ! 
 
 
 
 + _ + 
 
 
 
 B u i l d   a   g e n e r i c   s o r t   o f   c o d e w o r d / s i z e   a n d   s t r i n g   r e t r i e v a l   s e r v i c e . 
 
 
 
 s t r i n g   r e t r i e v a l : 
 
 s e l e c t 	 8 0 0 6 5 D 9 0 
 
 i t e m 	 8 0 0 9 6 7 4 0 
 
 m a i l 	 8 0 0 9 3 D A 8 
 
 m s g 	 8 0 0 9 E 5 5 8 
 
 s u p e r 	 8 0 0 9 3 B 2 8 
 
 m u l t i 	 8 0 0 9 4 0 A 8 
 
 s t r i n g 	 8 0 0 C 3 F 7 0 
 
 n p c 	 8 0 0 A C C A C 
 
 p s 	 8 0 0 9 3 C 9 8 
 
 
 
 c o d e w o r d   r e t r i e v a l : 
 
 s e l e c t 	 8 0 0 6 5 5 2 8 
 
 i t e m 	 - 
 
 m a i l 	 8 0 0 9 3 8 7 8 
 
 m s g 	 8 0 0 9 E 3 8 8 
 
 s u p e r 	 8 0 0 9 3 5 F 8 
 
 m u l t i 	 8 0 0 9 3 F 9 4 
 
 s t r i n g 	 8 0 0 C 3 E 3 0 
 
 n p c 	 - 
 
 p s 	 8 0 0 9 3 7 3 8 
 
 
 
 + _ + 
 
 
 
 u s e   i t   t o   s e t   c a t c h p h r a s e s 
 
 8 0 0 A A 2 1 8 	 s e t   a c t o r   I D   A 1 ' s   c h a r a c t e r   a t t r i b u t e s   ( c a t c h p h r a s e ,   o u t f i t ,   e t c . ) 
 
 	 a c c e p t s :   A 0 = p - > t a r g e t ,   A 1 = n p c _ t x t   I D # ,   A 2 = p e r s o n a l i t y ? ,   A 3 = p - > N P C   r e s p o n s e   e n t r y 
 
 	 A D D I U 	 S P , S P , F F E 0 
 
 	 S W 	 S 0 , 0 0 1 8   ( S P ) 
 
 	 O R 	 S 0 , A 0 , R 0 	 ; S 0 = A 0 :   p - > t a r g e t 
 
 	 S W 	 R A , 0 0 1 C   ( S P ) 
 
 	 S W 	 A 3 , 0 0 2 4   ( S P ) 	 ; S P + 2 4 = A 3 :   p - > N P C   r e s p o n s e   t a b l e 
 
 	 A D D I U 	 A T , R 0 , 0 0 0 E 	 ; A T = E 
 
 	 A N D I 	 T 7 , A 1 , F 0 0 0 	 ; T 7 = A 1   &   F 0 0 0 :   I D   t y p e 
 
 	 S R A 	 T 8 , T 7 , 0 x C 	 ; T 8 = u p p e r   n i b b l e   o f   I D 
 
 	 B N E 	 T 8 , A T , 8 0 0 A A 2 8 C 	 ; r e t u r n   i f   n o t   a n   n p c _ t x t   I D 
 
 	 L H U 	 T 0 , 0 0 0 0   ( A 3 ) 
 
 / / 8 0 0 A A 2 4 0 : 
 
 	 S H 	 T 0 , 0 5 2 0   ( S 0 ) 
 
 	 S H 	 A 1 , 0 0 0 0   ( S 0 ) 
 
 	 S B 	 A 2 , 0 0 0 B   ( S 0 ) 	 ; S a v e   b y t e   - >   A 0 + B 
 
 	 A D D I U 	 A 1 , R 0 , 0 0 0 7 	 ; A 1 = 7 :   # b y t e s 
 
 	 A D D I U 	 A 0 , S 0 , 0 4 E 5 	 ; A 0 = S 0 + 4 E 5 :   p - > t a r g e t 
 
 	 J A L 	 8 0 0 9 9 9 2 C 	 ; m e m s e t ( A 0 , A 1 , A 2 ) 
 
 	 A D D I U 	 A 2 , R 0 , 0 0 2 0 	 ; A 2 = 2 0 :   '   ' 
 
 / / 8 0 0 A A 2 5 C : 	 c o p y   t o   s t r i n g 
 
 	 L W 	 A 3 , 0 0 2 4   ( S P ) 
 
 	 A D D I U 	 A 0 , S 0 , 0 4 E 5 	 ; A 0 = S 0 + 4 E 5 :   p - > t a r g e t 
 
 	 J A L 	 8 0 0 C 3 F 7 0 	 ; r e t r i e v e   s t r i n g   f r o m   s t r i n g _ t x t 
 
 	 L H U 	 A 2 , 0 0 0 2   ( A 3 ) 	 ; A 2 = A 3 + 2 :   i n d e x # 
 
 / / 8 0 0 A A 2 6 C : 	 c o p y   t o   f i n a l   l o c a t i o n 
 
 	 L U I 	 A 1 , 8 0 1 3 
 
 	 A D D I U 	 A 1 , A 1 , 9 E 0 0 
 
 	 L H U 	 T 1 , 0 0 0 8   ( A 1 ) 	 ; T 1 = 8 0 1 2 9 E 0 8 :   
 
 	 A D D I U 	 A 0 , S 0 , 0 0 0 4 	 ; A 0 = S O + 4 : 	 A 0 = p - > t a r g e t   [ 8 0 1 3 0 D B C ] 
 
 	 A D D I U 	 A 2 , R 0 , 0 0 0 7 	 ; A 2 = s t r l e n   7 
 
 	 J A L 	 8 0 0 9 9 8 C 0 	 ; c o p y   A 2   b y t e s   f r o m   s t r i n g   A 1   t o   A 0 
 
 	 S H 	 T 1 , 0 0 0 2   ( S 0 ) 	 ; [ 0 ] - > S 0 + 2 
 
 / / 8 0 0 A A 2 8 8 : 	 r e t u r n 
 
 	 L W 	 R A , 0 0 1 C   ( S P ) 
 
 	 L W 	 S 0 , 0 0 1 8   ( S P ) 
 
 	 A D D I U 	 S P , S P , 0 0 2 0 
 
 	 J R 	 R A 
 
 	 N O P 
 
 
 
 " m i n o r "   r e v i s i o n   t o   s e t   7 F 6 F   s t r i n g s   f o r   c a t c h p h r a s e s ! 
 
 8 0 0 A A 2 1 8 	 5 8 7 9 8 	 s e t   a c t o r   I D   A 1 ' s   c h a r a c t e r   a t t r i b u t e s   ( c a t c h p h r a s e ,   o u t f i t ,   e t c . ) 
 
 	 a c c e p t s :   A 0 = p - > t a r g e t ,   A 1 = n p c _ t x t   I D # ,   A 2 = p e r s o n a l i t y ? ,   A 3 = p - > N P C   r e s p o n s e   e n t r y 
 
 2 7 B D F F E 0 	 A D D I U 	 S P , S P , F F E 0 
 
 A F A 4 0 0 1 8 	 * S W 	 A 0 , 0 0 1 8   ( S P ) 	 ; S P + 2 0 = A 0 :   p - > t a r g e t 
 
 3 4 0 1 E 0 0 0 	 * O R I 	 A T , R 0 , E 0 0 0 	 ; A T = E 0 0 0 
 
 A F B F 0 0 1 C 	 S W 	 R A , 0 0 1 C   ( S P ) 
 
 3 0 B 8 F 0 0 0 	 * A N D I 	 T 8 , A 1 , F 0 0 0 	 ; T 7 = A 1   &   F 0 0 0 :   I D   t y p e 
 
 1 7 0 1 0 0 1 8 	 * B N E 	 T 8 , A T , 8 0 0 A A 2 8 C 	 ; r e t u r n   i f   n o t   a n   n p c _ t x t   I D 
 
 9 4 E 8 0 0 0 0 	 L H U 	 T 0 , 0 0 0 0   ( A 3 ) 
 
 A 4 8 8 0 5 2 0 	 * S H 	 T 0 , 0 5 2 0   ( A 0 ) 
 
 A 4 8 5 0 0 0 0 	 * S H 	 A 1 , 0 0 0 0   ( A 0 ) 
 
 A 0 8 6 0 0 0 B 	 * S B 	 A 2 , 0 0 0 B   ( A 0 ) 	 ; S a v e   b y t e   - >   A 0 + B 
 
 / / 8 0 0 A A 2 4 C : 	 e x t e n d   n a m e   a n d   i n s e r t 
 
 9 4 E 2 0 0 0 2 	 * L H U 	 V 0 , 0 0 0 2   ( A 3 ) 	 ; V 0 = A 3 + 2 :   i n d e x # 
 
 3 C 0 1 7 F 6 F 	 * L U I 	 A T , 7 F 6 F 
 
 3 4 4 2 D 0 0 0 	 * O R I 	 V 0 , V 0 , D 0 0 0 
 
 0 0 2 2 1 0 2 5 	 * O R 	 V 0 , A T , V 0 
 
 A F A 2 0 0 2 4 	 * S W 	 V 0 , 0 0 2 4   ( S P ) 	 ; S P + 2 4 = V 0 :   c a t c h p h r a s e   i n d e x # 
 
 3 4 0 2 2 0 2 0 	 * O R I 	 V 0 , R 0 , 2 0 2 0 
 
 A 7 A 2 0 0 2 8 	 * S H 	 V 0 , 0 0 2 8   ( S P ) 	 ; S P + 2 8 = "     " 
 
 A 7 A 2 0 0 2 A 	 * S H 	 V 0 , 0 0 2 A   ( S P ) 	 ; S P + 2 8 = "         " 
 
 2 7 A 5 0 0 2 4 	 * A D D I U 	 A 1 , S P , 0 0 2 4 
 
 2 4 0 6 0 0 0 7 	 * A D D I U 	 A 2 , R 0 , 0 0 0 7 	 ; A 2 = 7 :   # b y t e s 
 
 0 C 0 2 6 6 3 0 	 * J A L 	 8 0 0 9 9 8 C 0 	 ; c o p y   A 2   b y t e s   f r o m   s t r i n g   A 1   t o   A 0 
 
 2 4 8 4 0 4 E 5 	 * A D D I U 	 A 0 , A 0 , 0 4 E 5 	 ; A 0 = S 0 + 4 E 5 :   p - > t a r g e t 
 
 / / 8 0 0 A A 2 6 C : 	 c o p y   t o   f i n a l   l o c a t i o n 
 
 3 C 0 5 8 0 1 3 	 L U I 	 A 1 , 8 0 1 3 
 
 8 C A 5 9 E 0 0 	 A D D I U 	 A 1 , A 1 , 9 E 0 0 
 
 9 4 A 9 0 0 0 8 	 L H U 	 T 1 , 0 0 0 8   ( A 1 ) 	 ; T 1 = 8 0 1 2 9 E 0 8 :   
 
 8 F A 4 0 0 1 8 	 * L W 	 A 0 , 0 0 1 8   ( S P ) 
 
 A 4 8 9 0 0 0 2 	 * S H 	 T 1 , 0 0 0 2   ( A 0 ) 	 ; [ 0 ] - > S 0 + 2 
 
 2 4 0 6 0 0 0 7 	 A D D I U 	 A 2 , R 0 , 0 0 0 7 	 ; A 2 = s t r l e n   7 
 
 0 C 0 2 6 6 3 0 	 J A L 	 8 0 0 9 9 8 C 0 	 ; c o p y   A 2   b y t e s   f r o m   s t r i n g   A 1   t o   A 0 
 
 2 4 8 4 0 0 0 4 	 * A D D I U 	 A 0 , A 0 , 0 0 0 4 	 ; A 0 = S O + 4 : 	 A 0 = p - > t a r g e t   [ 8 0 1 3 0 D B C ] 
 
 / / 8 0 0 A A 2 8 8 : 	 r e t u r n 
 
 8 F B F 0 0 1 C 	 L W 	 R A , 0 0 1 C   ( S P ) 
 
 0 3 E 0 0 0 0 8 	 J R 	 R A 
 
 2 7 B D 0 0 2 0 	 A D D I U 	 S P , S P , 0 0 2 0 
 
 
 
 + _ + 
 
 
 
 C - 7 C D 7 E 0 
 
 8 0 2 8 5 5 2 0   i s   u s e d   t o   g e n e r a t e   N o o k ' s   s h o p   m a p   p o s i t i o n .     ( A s   i n   a c r e   b l a h   -   b l i t t y b l a h ) 
 
 W o u l d   p r e f e r   l e t t e r ,   n u m e r a l .   A d d   + 0 x 1 0   t o   i n i t i a l   r e s u l t   s t r i n g ,   I   t h i n k . 
 
 	 A D D I U 	 S P , S P , F F D 8 
 
 	 S W 	 R A , 0 0 1 C   ( S P ) 
 
 	 S W 	 A 0 , 0 0 2 8   ( S P ) 
 
 8 C 8 5 0 9 5 4 	 * L W 	 A 1 , 0 9 5 4   ( A 0 ) 
 
 	 A D D I U 	 A 0 , S P , 0 0 2 7 
 
 	 A D D I U 	 A 2 , R 0 , 0 0 0 1 
 
 	 S W 	 R 0 , 0 0 1 0   ( S P ) 
 
 	 J A L 	 8 0 0 9 2 6 4 C 	 ; A 0 = n u m b e r   A 1   c o n v e r t e d   t o   n u m e r a l   o f   l e n g t h   A 2 
 
 	 A D D I U 	 A 3 , R 0 , 0 0 0 1 
 
 / / 	 i n s e r t e d   t o   c o n v e r t   n u m e r a l   t o   l e t t e r 
 
 9 3 A 2 0 0 2 7 	 * L B U 	 V 0 , 0 0 2 7   ( S P ) 
 
 2 4 4 2 0 0 1 0 	 * A D D I U 	 V 0 , V 0 , 0 0 1 0 
 
 	 J A L 	 8 0 0 9 D 1 F 0 	 ; V 0 = p - > t e x t   c o n t r o l l e r 
 
 A 3 A 2 0 0 2 7 	 * S B 	 V 0 , 0 0 2 7   ( S P ) 
 
 	 O R 	 A 0 , V 0 , R 0 
 
 	 A D D I U 	 A 1 , R 0 , 0 0 0 1 
 
 	 A D D I U 	 A 2 , S P , 0 0 2 7 
 
 	 J A L 	 8 0 0 9 D 6 D 0 	 ; c o p y   A 3   b y t e s   f r o m   s t r i n g   A 2   t o   s l o t   A 1   o f   o f   t e x t   c o n t r o l l e r   A 0 
 
 	 A D D I U 	 A 3 , R 0 , 0 0 0 1 
 
 / / 8 0 2 8 5 5 6 4 : 	 s o r t   t o   c o m p r e s s   a   t a d   b e t t e r 
 
 8 F A 4 0 0 2 8 	 * L W 	 A 0 , 0 0 2 8   ( S P ) 
 
 A C 8 5 0 9 5 0 	 * L W 	 A 1 , 0 9 5 0   ( A 0 ) 
 
 	 A D D I U 	 A 0 , S P , 0 0 2 7 
 
 	 A D D I U 	 A 2 , R 0 , 0 0 0 1 
 
 	 S W 	 R 0 , 0 0 1 0   ( S P ) 
 
 	 J A L 	 8 0 0 9 2 6 4 C 
 
 	 A D D I U 	 A 3 , R 0 , 0 0 0 1 
 
 	 J A L 	 8 0 0 9 D 1 F 0 	 ; V 0 = p - > t e x t   c o n t r o l l e r 
 
 	 N O P 
 
 	 O R 	 A 0 , V 0 , R 0 
 
 	 A D D I U 	 A 1 , R 0 , 0 0 0 2 
 
 	 A D D I U 	 A 2 , S P , 0 0 2 7 
 
 	 J A L 	 8 0 0 9 D 6 D 0 	 ; c o p y   A 3   b y t e s   f r o m   s t r i n g   A 2   t o   s l o t   A 1   o f   o f   t e x t   c o n t r o l l e r   A 0 
 
 	 A D D I U 	 A 3 , R 0 , 0 0 0 1 
 
 / / 8 0 2 8 5 5 A 0 : 
 
 	 L W 	 R A , 0 0 1 C   ( S P ) 
 
 	 J R 	 R A 
 
 	 - A D D I U 	 S P , S P , 0 0 2 8 
 
 
 
     S t i l l   w o n ' t   c o m p r e s s .     T i m e   t o   d o   t h i n g s   t h e   s t u p i d   w a y !     J u s t   a d d   4 0   a n d   3 0   t o   e a c h   n u m b e r . 
 
 	 A D D I U 	 S P , S P , F F D 8 
 
 	 S W 	 R A , 0 0 1 C   ( S P ) 
 
 	 S W 	 A 0 , 0 0 2 8   ( S P ) 
 
 8 C 8 2 0 9 5 4 	 * L W 	 V 0 , 0 9 5 4   ( A 0 ) 
 
 2 4 4 2 0 0 4 0 	 * A D D I U 	 V 0 , V 0 , 0 0 4 0 	 ; c o n v r t s   n u m b e r   t o   l e t t e r   a l l   r i g h t   ; * ) 
 
 A 3 A 2 0 0 2 7 	 * S B 	 V 0 , 0 0 2 7   ( S P ) 
 
 	 * N O P 
 
 	 * N O P 
 
 	 * N O P 
 
 
 
 7 E B 3 E 0   c o n t a i n s   t h e   S h r i n e ' s   o w n   m e t h o d   o f   s p i t t i n g   o u t   m a p   c o o r d i n a t e s 
 
 / / 8 0 2 9 4 8 C 4 : 
 
 	 L W 	 A 1 , 0 0 3 8   ( S P ) 
 
 	 A D D I U 	 A 2 , R 0 , 0 0 0 A 
 
 	 J A L 	 8 0 0 9 2 6 4 C 
 
 	 S W 	 R 0 , 0 0 1 0   ( S P ) 
 
 	 L W 	 A 0 , 0 0 4 C   ( S P ) 
 
 	 A D D I U 	 A 1 , R 0 , 0 0 0 1 
 
 	 A D D I U 	 A 2 , S P , 0 0 2 8 
 
 	 J A L 	 8 0 0 9 D 6 D 0 
 
 	 A D D I U 	 A 3 , R 0 , 0 0 0 A 
 
 	 A D D I U 	 A 0 , S P , 0 0 2 8 
 
 	 L W 	 A 1 , 0 0 3 4   ( S P ) 
 
 	 A D D I U 	 A 2 , R 0 , 0 0 0 A 
 
 	 J A L 	 8 0 0 9 2 6 4 C 
 
 	 S W 	 R 0 , 0 0 1 0   ( S P ) 
 
 	 L W 	 A 0 , 0 0 4 C   ( S P ) 
 
 	 O R 	 A 1 , R 0 , R 0 
 
 	 A D D I U 	 A 2 , S P , 0 0 2 8 
 
 	 J A L 	 8 0 0 9 D 6 D 0 
 
 	 A D D I U 	 A 3 , R 0 , 0 0 0 A 
 
 	 B E Q 	 R 0 , R 0 , 8 0 2 9 4 9 3 0 
 
 	 L W 	 A 0 , 0 0 4 C   ( S P ) 
 
 	 
 
 S e c o n d   j o b ,   a l s o   i n d e p e n d a n t   c o d e : 	 7 C E 3 F 0 
 
 / / 8 0 2 9 A 1 0 0 : 
 
 	 L U I 	 T 8 , 8 0 1 2 
 
 	 A D D I U 	 T 8 , T 8 , 6 E A 0 
 
 	 S L L 	 T 7 , T 7 , 0 x 3 
 
 	 A D D U 	 V 0 , T 7 , T 8 
 
 	 A D D I U 	 A 1 , V 0 , 7 F F F 
 
 	 L B U 	 A 1 , 2 3 F B   ( A 1 ) 
 
 	 S W 	 V 0 , 0 0 2 0   ( S P ) 
 
 	 S W 	 R 0 , 0 0 1 0   ( S P ) 
 
 	 A D D I U 	 A 2 , R 0 , 0 0 0 6 
 
 	 J A L 	 8 0 0 9 2 6 4 C 
 
 	 A D D I U 	 A 3 , R 0 , 0 0 0 1 
 
 	 L W 	 A 0 , 0 0 3 C   ( S P ) 
 
 	 A D D I U 	 A 1 , R 0 , 0 0 0 3 
 
 	 A D D I U 	 A 2 , S P , 0 0 2 C 
 
 	 J A L 	 8 0 0 9 D 6 D 0 
 
 	 A D D I U 	 A 3 , R 0 , 0 0 0 6 
 
 / / 8 0 2 9 A 1 4 0 : 
 
 . . . 
 
 / / 8 0 2 9 A 1 9 4 : 
 
 	 J A L 	 8 0 0 9 D 8 2 0 
 
 	 A D D I U 	 A 3 , R 0 , 0 0 0 6 	 ; a c t o r   n a m e ,   s o   c h a n g e   t o   8 ! 
 
 	 
 
 l i k e l y   m o r e   o f   t h e s e . . . 	 
 
 	 0 C 0 2 4 9 9 3 
 
 	 0 C 0 2 B 3 4 6 
 
 
 
 + _ + 
 
 
 
 R e d o i n g   t h e   f o n t   s y s t e m ,   i n   p a r t   t o   r e u s e   t h e   o r i g i n a l   f o n t   t a b l e ,   i n   p a r t   t o   c o r r e c t   f i x e d - w i d t h   d i s p l a y ,   i n   p a r t   t o   m a k e   t h i n g s   m o r e   c o n f u s i n g   t o   t h o s e   w h o   r e a d   t h e s e . 
 
 	 R e f e r   t o   t h e   m e s s   a t   8 0 0 9 1 2 4 4 . 
 
 B a s i c   i d e a   i s   s u c h : 
 
 	 1 )   F o n t   o f f s e t   d a t a   b a s i c a l l y   d o e s n ' t   c h a n g e .     S t i l l   g i v e s   s i z e   c o r r e c t i o n   f o r   c h a r a c t e r . 
 
 	 2 )   A l l   c h a r a c t e r s   a r e   c e n t e r e d .     A n y   o d d   p i x e l s   w i l l   b e   p u s h e d   t o   t h e   l e f t   t o   e n s u r e   t h e y   a p p e a r . 
 
 	 3 )   R e t u r n e d   v a l u e   i s   a c t u a l   c h a r a c t e r   w i d t h .     B a s i c a l l y ,   0 x C - c o r r e c t i o n . 
 
 	 4 )   L e f t   o f f s e t t i n g   i s   t h e   a v e r a g e   o f   0 x C - w i d t h .     
 
 F o r   e x a m p l e ,   w i t h   a n   i m a g e   9   b y t e s   w i d e : 
 
 	 C o r r e c t i o n   v a l u e   o f   3 . 
 
 	 A c t u a l   w i d t h   i s   C - 3   =   9 . 
 
 	 L e f t   o f f s e t   i s   ( C - 9 ) / 2   =   1 . 
 
 	 R e s u l t   s o u r c e   r e a d :   . + + + + + + + + + . . 
 
 
 
 8 0 0 9 1 1 E 8 	 3 F 7 6 8 	 p r i n t s   f o r m a t t e d   c h a r   t o   s c r e e n ,   c a l l i n g   8 0 0 9 0 6 9 C 
 
 
 
 W e l l ,   t h i s   h a n d l e s   o n e   i n s t a n c e - - s m a l l   c o l o u r e d   b a l l o o n s   l i k e   c h a r a c t e r   n a m e   b u b b l e s . 
 
 O n   s e c o n d   t h o u g h t ,   m i g h t   b e   b e t t e r   t o   j u s t   h a c k   i t   w i t h i n   8 0 0 9 0 6 9 C . 
 
 T h a t ' s   w h a t   r e t u r n s   t h e   " b a s e "   o f f s e t   v a l u e   t o   t h e   i m a g e   t h a t   I ' m   o f f s e t t i n g   a b o v e . 
 
 
 
 8 0 0 9 0 6 9 C 	 3 E C 1 C 	 s e t   f o n t   t i l e s   a n d   r e t u r n   c h a r   p r o p o r t i o n s 
 
 	 a c c e p t s :   A 0 = p - > D L   p o i n t e r ,   A 1 = c h a r # ,   A 2 = @ i m a g e   o f f s e t ,   A 3 = @ l i n e # ,   S P + 1 0 = @ i m a g e   o f f s e t   e d g e ,   S P + 1 4 = @ l i n e   b o t t o m 
 
 	 A D D I U 	 S P , S P , F F E 0 
 
 	 S W 	 R A , 0 0 1 4   ( S P ) 
 
 	 S W 	 A 0 , 0 0 2 0   ( S P ) 	 ; S P + 2 0 = A 0 :   p - > D L   p o i n t e r 
 
 	 S W 	 A 1 , 0 0 2 4   ( S P ) 	 ; S P + 2 4 = A 1 :   c h a r # 
 
 	 S W 	 A 2 , 0 0 2 8   ( S P ) 	 ; S P + 2 8 = A 2 :   @ i m a g e   o f f s e t 
 
 	 S W 	 A 3 , 0 0 2 C   ( S P ) 	 ; S P + 2 C = A 3 :   @ l i n e # 
 
 	 L W 	 T 6 , 0 0 2 0   ( S P ) 	 ; T 6 = p - > D L   p o i n t e r 
 
 	 L W 	 V 1 , 0 0 0 0   ( T 6 ) 	 ; V 1 = p - > D L 
 
 	 J A L 	 8 0 0 9 0 1 7 8 	 ; V 0 = p - > f o n t   i m a g e s 
 
 	 S W 	 V 1 , 0 0 1 C   ( S P ) 	 ; S P + 1 C = V 1 :   p - > D L 
 
 / / 8 0 0 9 0 6 C 4 : 	 s e t t e x t u r e i m a g e 
 
 	 L W 	 V 1 , 0 0 1 C   ( S P ) 	 ; V 1 = p - > D L 
 
 	 L W 	 A 3 , 0 0 2 4   ( S P ) 	 ; A 3 = c h a r # 
 
 	 O R 	 A 0 , V 1 , R 0 	 ; A 0 = V 1 :   p - > D L 
 
 	 L U I 	 T 7 , F D 8 8 
 
 	 O R I 	 T 7 , T 7 , 0 0 5 F 	 ; T 7 = F D 8 8 0 0 5 F 
 
 	 S W 	 T 7 , 0 0 0 0   ( A 0 ) 	 ; D L + 0 = s e t t e x t u r e i m a g e . u :   i   8 b i t ,   0 x 6 0 
 
 	 S W 	 V 0 , 0 0 0 4   ( A 0 ) 	 ; D L + 4 = s e t t e x t u r e i m a g e . l :   a d d r e s s 
 
 	 A D D I U 	 V 1 , V 1 , 0 0 0 8 	 ; V 1 + = 8 :   n e x t   D L   o p 
 
 / / 8 0 0 9 0 6 E 4 : 	 s e t t i l e 
 
 	 S R A 	 A 1 , A 3 , 0 x 4 
 
 	 S L L 	 A 1 , A 1 , 0 x 4 	 ; A 1 = c h a r   &   0 x F 0 
 
 	 S U B U 	 A 0 , A 3 , A 1 	 ; A 0 = c h a r #   &   0 x F 
 
 	 A D D U 	 A T , A 0 , R 0 	 ; A T = A 0 :   l o w e r   n i b b l e 
 
 	 S L L 	 A 0 , A 0 , 0 x 2 
 
 	 S U B U 	 A 0 , A 0 , A T 
 
 	 S L L 	 A 0 , A 0 , 0 x 2 	 ; A 0 * = C :   x   o f f s e t   t o   f o n t   c h a r 
 
 	 A D D I U 	 A 2 , A 0 , 0 0 0 B 	 ; A 2 = x . o f f   +   B 
 
 	 S U B U 	 T 2 , A 2 , A 0 	 ; T 2 = ( x . o f f + B ) - x . o f f :   0 x B 
 
 	 A D D I U 	 T 2 , T 2 , 0 0 0 1 
 
 	 S R A 	 T 2 , T 2 , 0 x 1 	 ; T 2 / = 2 ,   r o u n d e d   u p 
 
 	 A D D I U 	 T 2 , T 2 , 0 0 0 7 
 
 	 S R A 	 T 2 , T 2 , 0 x 3 	 ; T 2 / = 8 ,   r o u n d e d   u p 
 
 	 A N D I 	 T 2 , T 2 , 0 1 F F 	 ; T 2 & = 0 x 1 F F :   e n s u r e   f a l l s   w i t h i n   9   b i t   r a n g e   u s e d   b y   m i c r o c o d e 
 
 	 O R 	 V 0 , V 1 , R 0 	 ; V 0 = V 1 :   p - > D L 
 
 	 S L L 	 T 2 , T 2 , 0 x 9 	 ; T 2 * = 2 0 0 :   x . o f f   - >   l i n e 
 
 	 L U I 	 A T , F 5 8 8 
 
 	 L U I 	 T 9 , 0 7 0 C 
 
 	 O R I 	 T 9 , T 9 , 0 3 0 0 	 ; T 9 = 0 7 0 C 0 3 0 0 
 
 	 O R 	 T 8 , T 2 , A T 	 ; T 8 = F 5 8 8 0 0 0 0   |   l i n e 
 
 	 S W 	 T 8 , 0 0 0 0   ( V 0 ) 	 ; D L + 0 = s e t t i l e . u :   i   8 b i t ,   l i n e 
 
 	 S W 	 T 9 , 0 0 0 4   ( V 0 ) 	 ; D L + 4 = s e t t i l e . l :   t i l e   7 ,   c l a m p   s t   m i r r o r   s t 
 
 	 A D D I U 	 V 1 , V 1 , 0 0 0 8 	 ; V 1 + = 8 :   n e x t   D L   o p 
 
 / / 8 0 0 9 0 7 4 0 : 	 l o a d s y n c 
 
 	 O R 	 V 0 , V 1 , R 0 	 ; V 0 = V 1 :   p - > D L 
 
 	 L U I 	 T 3 , E 6 0 0 
 
 	 S W 	 T 3 , 0 0 0 0   ( V 0 ) 	 ; D L + 0 = l o a d s y n c . u 
 
 	 S W 	 R 0 , 0 0 0 4   ( V 0 ) 	 ; D L + 4 = l o a d s y n c . l 
 
 	 A D D I U 	 V 1 , V 1 , 0 0 0 8 	 ; V 1 + = 8 :   n e x t   D L   o p 
 
 / / 8 0 0 9 0 7 5 4 : 	 l o a d t i l e 
 
 	 S L L 	 T 4 , A 0 , 0 x 1 	 ; T 4 = x . o f f * 2 
 
 	 A N D I 	 T 5 , T 4 , 0 F F F 
 
 	 S L L 	 T 6 , T 5 , 0 x C 
 
 	 L U I 	 A T , F 4 0 0 
 
 	 S L L 	 T 9 , A 2 , 0 x 1 	 ; T 9 = 0 x B   *   2 
 
 	 A N D I 	 T 3 , T 9 , 0 F F F 	 ; T 3 = T 9 & 0 x F F F :   u l s 
 
 	 O R 	 T 7 , T 6 , A T 	 ; T 7 = F 4 0 0 0 0 0 0   |   u l s 
 
 	 A D D I U 	 A 3 , A 1 , 0 0 0 F 	 ; A 3 = c h a r . u + F 
 
 	 S L L 	 T 1 , A 3 , 0 x 2 	 ; T 1 = ( c h a r . u + F ) * 4 
 
 	 L U I 	 A T , 0 7 0 0 
 
 	 S L L 	 T 4 , T 3 , 0 x C 	 ; T 4 = T 3 < < C :   l r s 
 
 	 O R 	 V 0 , V 1 , R 0 	 ; V 0 = V 1 :   p - > D L 
 
 	 S L L 	 T 0 , A 1 , 0 x 2 	 ; T 0 = c h a r . u * 4 
 
 	 A N D I 	 T 0 , T 0 , 0 F F F 	 ; T 0 & = 0 x F F F :   u l t 
 
 	 O R 	 T 5 , T 4 , A T 	 ; T 5 = t i l e   |   l r s 
 
 	 A N D I 	 T 1 , T 1 , 0 F F F 	 ; T 1 & = 0 x F F F :   l r t 
 
 	 O R 	 T 6 , T 5 , T 1 	 ; T 6 = t i l e   |   l r s   |   l r t 
 
 	 O R 	 T 8 , T 7 , T 0 	 ; T 8 = F 4 0 0 0 0 0 0   |   u l s   |   u l t 
 
 	 S W 	 T 8 , 0 0 0 0   ( V 0 ) 	 ; D L + 0 = l o a d t i l e . u :   
 
 	 S W 	 T 6 , 0 0 0 4   ( V 0 ) 	 ; D L + 4 = l o a d t i l e . l :   t i l e   7 ,   l r s ,   l r t 
 
 	 A D D I U 	 V 1 , V 1 , 0 0 0 8 	 ; V 1 + = 8 :   n e x t   D L   o p 
 
 / / 8 0 0 9 0 7 A 8 : 	 p i p e s y n c 
 
 	 O R 	 V 0 , V 1 , R 0 	 ; V 0 = V 1 :   p - > D L 
 
 	 L U I 	 T 7 , E 7 0 0 
 
 	 S W 	 T 7 , 0 0 0 0   ( V 0 ) 	 ; D L + 0 = p i p e s y n c . u 
 
 	 S W 	 R 0 , 0 0 0 4   ( V 0 ) 	 ; D L + 4 = p i p e s y n c . l 
 
 	 A D D I U 	 V 1 , V 1 , 0 0 0 8 	 ; V 1 + = 8 :   n e x t   D L   o p 
 
 / / 8 0 0 9 0 7 B C : 	 s e t t i l e 
 
 	 O R 	 V 0 , V 1 , R 0 	 ; V 0 = V 1 :   p - > D L 
 
 	 L U I 	 A T , F 5 8 0 
 
 	 L U I 	 T 9 , 0 0 0 C 
 
 	 O R I 	 T 9 , T 9 , 0 3 0 0 	 ; T 9 = 0 0 0 C 0 3 0 0 
 
 	 O R 	 T 8 , T 2 , A T 	 ; T 8 = F 5 8 0 0 0 0 0   |   l i n e 
 
 	 S W 	 T 8 , 0 0 0 0   ( V 0 ) 	 ; D L + 0 = s e t t i l e . u :   i ,   l i n e 
 
 	 S W 	 T 9 , 0 0 0 4   ( V 0 ) 	 ; D L + 4 = s e t t i l e . l :   c l a m p   s t   m i r r o r   s t 
 
 	 A D D I U 	 V 1 , V 1 , 0 0 0 8 	 ; V 1 + = 8 :   n e x t   D L   o p 
 
 / / 8 0 0 9 0 7 D C : 	 s e t t i l e s i z e 
 
 	 S L L 	 T 3 , A 0 , 0 x 2 	 ; T 4 = x . o f f * 4 
 
 	 A N D I 	 T 4 , T 3 , 0 F F F 
 
 	 S L L 	 T 8 , A 2 , 0 x 2 	 ; T 8 = 0 x B   *   4 
 
 	 A N D I 	 T 9 , T 8 , 0 F F F 
 
 	 S L L 	 T 5 , T 4 , 0 x C 	 ; T 5 = x . o f f   - >   u l s 
 
 	 O R 	 V 0 , V 1 , R 0 	 ; V 0 = V 1 :   p - > D L 
 
 	 L U I 	 A T , F 2 0 0 
 
 	 O R 	 T 6 , T 5 , A T 	 ; T 6 = F 2 0 0 0 0 0 0   |   u l s 
 
 	 S L L 	 T 3 , T 9 , 0 x C 	 ; T 3 = w i d t h   - >   l r s 
 
 	 O R 	 T 4 , T 3 , T 1 	 ; T 4 = l r s   |   l r t 
 
 	 O R 	 T 7 , T 6 , T 0 	 ; T 7 = F 2 0 0 0 0 0 0   |   u l s   |   u l t 
 
 	 S W 	 T 7 , 0 0 0 0   ( V 0 ) 	 ; D L + 0 = s e t t i l e s i z e . u :   u l s ,   u l t 
 
 	 S W 	 T 4 , 0 0 0 4   ( V 0 ) 	 ; D L + 4 = s e t t i l e s i z e . l :   t i l e   0 ,   l r s ,   l r t 
 
 	 A D D I U 	 V 1 , V 1 , 0 0 0 8 	 ; V 1 + = 8 :   n e x t   D L   o p 
 
 / / 8 0 0 9 0 8 1 4 : 	 r e t u r n 
 
 	 L W 	 T 5 , 0 0 2 0   ( S P ) 	 ; T 5 = S P + 2 0 :   p - > D L   p o i n t e r 
 
 	 S W 	 V 1 , 0 0 0 0   ( T 5 ) 	 ; V 1 - > T 5 + 0 :   s a v e   p - > D L   t o   a d d r e s s 
 
 	 L W 	 T 6 , 0 0 2 8   ( S P ) 	 ; T 6 = S P + 2 8 :   @ i m a g e   o f f s e t 
 
 	 S W 	 A 0 , 0 0 0 0   ( T 6 ) 	 ; A 0 - > T 6 + 0 :   x   o f f s e t 
 
 	 L W 	 T 7 , 0 0 2 C   ( S P ) 	 ; T 7 = S P + 2 C :   @ l i n e # 
 
 	 S W 	 A 1 , 0 0 0 0   ( T 7 ) 	 ; A 1 - > T 7 + 0 :   c h a r . u p p e r   n i b b l e 
 
 	 L W 	 T 8 , 0 0 3 0   ( S P ) 	 ; T 8 = S P + 3 0 :   @ i m g o f f e d g e 
 
 	 S W 	 A 2 , 0 0 0 0   ( T 8 ) 	 ; A 2 - > T 8 + 0 :   w i d t h 
 
 	 L W 	 T 9 , 0 0 3 4   ( S P ) 	 ; T 9 = S P + 3 4 :   @ l i n e b o t 
 
 	 S W 	 A 3 , 0 0 0 0   ( T 9 ) 	 ; A 3 - > T 9 + 0 :   h e i g h t 
 
 	 L W 	 R A , 0 0 1 4   ( S P ) 
 
 	 J R 	 R A 
 
 	 A D D I U 	 S P , S P , 0 0 2 0 
 
 
 
 N e e d   t o   c a l l   8 0 0 9 0 1 4 0   i f   v a r . w i d t h ,   A 0 = c h a r # .     I t   w i l l   f r y   T 6   b u t   r e t u r n   V 0 = c o r r e c t i o n . 
 
 T o   g e t   w i d t h   t y p e ,   u h m . . . 
 
 	 B E Q 	 V 0 , R 0 , + s k i p 	 ; b r a n c h   i f   f i x e d - w i d t h 
 
 	 O R 	 A 3 , R 0 , A 0 	 ; A 3 = A 0 ,   t o   s a v e   x . o f f 
 
 	 J A L 	 8 0 0 9 0 1 4 0 	 ; V 0 = c o r r e c t i o n 
 
 	 L W 	 A 0 , 0 0 2 4   ( S P ) 	 ; A 0 = c h a r # 
 
 	 S R L 	 V 0 , V 0 , 0 x 1 	 ; h a l f   o f   t h a t 
 
 	 A D D U 	 A 3 , V 0 , A 3 	 ; A 3 = o f f s e t   x . o f f 
 
 	 / / s k i p 
 
 	 L W 	 T 8 , 0 0 2 8   ( S P ) 	 ; T 6 = S P + 2 8 :   @ i m a g e   o f f s e t 
 
 	 S W 	 A 3 , 0 0 0 0   ( T 8 ) 
 
 	 
 
 
 
 
 
 O h ,   8 0 0 9 1 B D 8   s e t s   i t   w h e n   b u i l d i n g   b l o c k .     M i g h t   b e   a b l e   t o   s e t   t o   a   s t a t i c   l o c a t i o n   a n d   s i m p l y   c o p y   f r o m   t h e r e .     O n e   w a y   o r   a n o t h e r ,   w i l l   n e e d   a   s t a t i c   l o c a t i o n   f o r   r e f e r e n c e ,   n o t   t h i s   c r a p p y   " t e m p   o n l y   o n   s t a c k "   n o n s e n s e . 
 
 